Fix #745, including test.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3299 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-06-08 18:31:28 +00:00
parent 7c0ab6567f
commit 905bd6d441
2 changed files with 14 additions and 2 deletions

View File

@@ -68,8 +68,10 @@ OpenLayers.Layer.Image.prototype =
*
*/
destroy: function() {
this.tile.destroy();
this.tile = null;
if (this.tile) {
this.tile.destroy();
this.tile = null;
}
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
},