diff --git a/lib/OpenLayers/Layer/Google/v3.js b/lib/OpenLayers/Layer/Google/v3.js index d0f88f418e..5b225f056b 100644 --- a/lib/OpenLayers/Layer/Google/v3.js +++ b/lib/OpenLayers/Layer/Google/v3.js @@ -119,7 +119,7 @@ OpenLayers.Layer.Google.v3 = { google.maps.event.trigger(this.mapObject, "resize"); var div = this.mapObject.getDiv().firstChild; - if (div.childNodes.length < 3) { + if (!div || div.childNodes.length < 3) { this.repositionTimer = window.setTimeout( OpenLayers.Function.bind(this.repositionMapElements, this), 250