diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index bc7c1baf6f..1fba9e057f 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -213,7 +213,7 @@ OpenLayers.Tile = OpenLayers.Class({ */ setBounds: function(bounds) { bounds = bounds.clone(); - if (this.layer.map.baseLayer.wrapDateLine) { + if (this.layer.map && this.layer.map.baseLayer.wrapDateLine) { var worldExtent = this.layer.map.getMaxExtent(); bounds = bounds.wrapDateLine(worldExtent); }