cannot destroy a map with panels, r=fredj (closes #2864)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10810 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2010-10-06 09:15:00 +00:00
parent 233ffe6a10
commit 26d20c1fb1

View File

@@ -343,7 +343,10 @@ OpenLayers.Control = OpenLayers.Class({
this.displayClass.replace(/ /g, "") + "Active" this.displayClass.replace(/ /g, "") + "Active"
); );
} }
this.events.triggerEvent("deactivate"); // deal with the case where the control is destroyed
if(this.events) {
this.events.triggerEvent("deactivate");
}
return true; return true;
} }
return false; return false;