fixing error when closing page in IE. Thanks bartvde for the testcase. r=bartvde (closes #3003)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-02-18 15:22:12 +00:00
parent 28e5614e98
commit d6695cff67
3 changed files with 28 additions and 1 deletions

View File

@@ -68,11 +68,11 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
* Method: destroy
*/
destroy: function() {
OpenLayers.Handler.prototype.destroy.apply(this, arguments);
if (this.dragHandler) {
this.dragHandler.destroy();
this.dragHandler = null;
}
OpenLayers.Handler.prototype.destroy.apply(this, arguments);
},
/**