From 895ba639ae7aaa9dea32beb6f2408d5c9ee681c7 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 5 Apr 2007 23:02:48 +0000 Subject: [PATCH] patch for #636 - double-protect layer.destroy() git-svn-id: http://svn.openlayers.org/trunk/openlayers@3023 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index d687237a78..a0a1634b5c 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -188,7 +188,9 @@ OpenLayers.Layer.prototype = { this.div = null; this.options = null; - this.events.destroy(); + if (this.events) { + this.events.destroy(); + } this.events = null; },