From 99eaf40e5c0e23de600da876547481c2433fdc63 Mon Sep 17 00:00:00 2001 From: euzuro Date: Fri, 16 Feb 2007 16:34:14 +0000 Subject: [PATCH] patch for #485 -- prevents script error on destruction of layer due to null tile. test pass in ff & ie7 git-svn-id: http://svn.openlayers.org/trunk/openlayers@2226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WMS/Untiled.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/WMS/Untiled.js b/lib/OpenLayers/Layer/WMS/Untiled.js index f9d528b9d9..4634ef2ad7 100644 --- a/lib/OpenLayers/Layer/WMS/Untiled.js +++ b/lib/OpenLayers/Layer/WMS/Untiled.js @@ -66,8 +66,10 @@ OpenLayers.Layer.WMS.Untiled.prototype = * */ destroy: function() { - this.tile.destroy(); - this.tile = null; + if (this.tile) { + this.tile.destroy(); + this.tile = null; + } OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); },