Destroy handler if we have one.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-31 18:33:21 +00:00
parent 4aec64aa67
commit 970c9655ac

View File

@@ -65,6 +65,9 @@ OpenLayers.Control.prototype = {
*/ */
destroy: function () { destroy: function () {
// eliminate circular references // eliminate circular references
if (this.handler) {
this.handler.destroy();
}
this.map = null; this.map = null;
}, },