diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 96a2a0f235..f8bd639bcf 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -23,7 +23,7 @@ OpenLayers.Tile.Image.prototype = }, destroy: function() { - if ((this.img) && (this.img.parentNode == this.layer.div)) { + if ((this.img != null) && (this.img.parentNode == this.layer.div)) { this.layer.div.removeChild(this.img); } this.img = null;