Explicitly check that we know who the parent is before removing child from parent. r=crschmidt (closes #1316)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1000,7 +1000,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
removeControl: function (control) {
|
||||
//make sure control is non-null and actually part of our map
|
||||
if ( (control) && (control == this.getControl(control.id)) ) {
|
||||
if (!control.outsideViewport && control.div) {
|
||||
if (control.div && (control.div.parentNode == this.viewPortDiv)) {
|
||||
this.viewPortDiv.removeChild(control.div);
|
||||
}
|
||||
OpenLayers.Util.removeItem(this.controls, control);
|
||||
|
||||
Reference in New Issue
Block a user