[OpenLayers-Commits] r7481 - sandbox/vector-behavior/lib/OpenLayers

commits at openlayers.org commits at openlayers.org
Wed Jul 9 09:07:01 EDT 2008


Author: elemoine
Date: 2008-07-09 09:07:01 -0400 (Wed, 09 Jul 2008)
New Revision: 7481

Modified:
   sandbox/vector-behavior/lib/OpenLayers/Strategy.js
Log:
in destroy() deactivate the strategy before setting this.layer to null, strategies indeed need the layer object to unregister the layer event listeners


Modified: sandbox/vector-behavior/lib/OpenLayers/Strategy.js
===================================================================
--- sandbox/vector-behavior/lib/OpenLayers/Strategy.js	2008-07-09 08:29:36 UTC (rev 7480)
+++ sandbox/vector-behavior/lib/OpenLayers/Strategy.js	2008-07-09 13:07:01 UTC (rev 7481)
@@ -28,8 +28,8 @@
      * Clean up the strategy.
      */
     destroy: function() {
+        this.deactivate();
         this.layer = null;
-        this.deactivate();
     },
 
     /**



More information about the Commits mailing list