From fa3d89f5727d7170d77270f8f936a05aa9da27d1 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Mon, 30 Jan 2012 19:42:23 +0100 Subject: [PATCH] A popup can be destroyed before obtaining the images of `contentDiv`. --- lib/OpenLayers/Popup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 36f666e73f..774ecb8c03 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -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 ) {