From cca0bf5e38b714e3f940a1ec6e32bc5d0227fe47 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 28 Sep 2011 15:07:47 -0600 Subject: [PATCH] Check for map first. No functional change, but fixes tests and does not hurt (see #3521) --- lib/OpenLayers/Tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }