Fix for bug introduced with r510. Only make the removeChild call if the parentNode is properly set. This way we can zap the grid div contents quickly with the div.innerHTML = "" but still have a valid good destroy() function.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@511 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -23,7 +23,9 @@ OpenLayers.Tile.Image.prototype =
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.layer.div.removeChild(this.img);
|
if (this.img.parentNode == this.layer.div) {
|
||||||
|
this.layer.div.removeChild(this.img);
|
||||||
|
}
|
||||||
this.img = null;
|
this.img = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user