Check for map first. No functional change, but fixes tests and does not hurt (see #3521)

This commit is contained in:
ahocevar
2011-09-28 15:07:47 -06:00
parent dd48ea3cbc
commit cca0bf5e38

View File

@@ -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);
}