From 764d8f6f2c31a974c572e5efa267e16a42f42eb7 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Wed, 16 Dec 2015 17:40:28 -0500 Subject: [PATCH] Fix crash in debug mode when tile is missing. --- src/tiledimage.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 2d207af6..85abf9c6 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1050,12 +1050,12 @@ function onTileLoad( tiledImage, tile, time, image, errorMsg ) { * @property {string} message - The error message. */ tiledImage.viewer.raiseEvent("tile-load-failed", {tile: tile, tiledImage: tiledImage, time: time, message: errorMsg}); - if( !tiledImage.debugMode ){ - tile.loading = false; - tile.exists = false; - return; - } - } else if ( time < tiledImage.lastResetTime ) { + tile.loading = false; + tile.exists = false; + return; + } + + if ( time < tiledImage.lastResetTime ) { $.console.log( "Ignoring tile %s loaded before reset: %s", tile, tile.url ); tile.loading = false; return;