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:
@@ -685,7 +685,9 @@ OpenLayers.Popup = OpenLayers.Class({
|
|||||||
// 'img' properties in the context.
|
// 'img' properties in the context.
|
||||||
//
|
//
|
||||||
var onImgLoad = function() {
|
var onImgLoad = function() {
|
||||||
|
if (this.popup.id === null) { // this.popup has been destroyed!
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.popup.updateSize();
|
this.popup.updateSize();
|
||||||
|
|
||||||
if ( this.popup.visible() && this.popup.panMapIfOutOfView ) {
|
if ( this.popup.visible() && this.popup.panMapIfOutOfView ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user