Merge pull request #189 from jorix/popup-bug_onImageLoad

A popup can be destroyed before obtaining the images of `contentDiv`.
This commit is contained in:
Éric Lemoine
2012-03-02 14:34:24 -08:00

View File

@@ -685,7 +685,9 @@ OpenLayers.Popup = OpenLayers.Class({
// 'img' properties in the context.
//
var onImgLoad = function() {
if (this.popup.id === null) { // this.popup has been destroyed!
return;
}
this.popup.updateSize();
if ( this.popup.visible() && this.popup.panMapIfOutOfView ) {