Prevent OverviewMap.destroy() from running twice, which was causing test failures. Change has been reviewed and approved by crschmidt.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-04-02 00:46:07 +00:00
parent 7c6e6dfc6e
commit ce9ba4b560

View File

@@ -82,6 +82,9 @@ OpenLayers.Control.OverviewMap.prototype =
*
*/
destroy: function() {
if (!this.mapDiv) { // we've already been destroyed
return;
}
this.mapDiv.removeChild(this.extentRectangle);
this.extentRectangle = null;
this.rectEvents.destroy();