diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 872ce21bd4..06526d6f03 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -75,6 +75,9 @@ OpenLayers.Popup.prototype = { /** */ destroy: function() { + if (this.map != null) { + this.map.removePopup(this); + } this.div = null; this.map = null; },