fix NPE, handle CancellationException in BitmapTileLayer

This commit is contained in:
Hannes Janetzek 2014-01-30 20:56:48 +01:00
parent 3ad98603a4
commit e6c9bd09f1

View File

@ -120,7 +120,17 @@ public class BitmapTileLayer extends TileLayer<TileLoader> {
@Override @Override
protected boolean executeJob(MapTile tile) { protected boolean executeJob(MapTile tile) {
mTile = tile; mTile = tile;
return mTileDataSource.executeQuery(tile, this) == QueryResult.SUCCESS; QueryResult result = null;
try {
result = mTileDataSource.executeQuery(tile, this);
} catch (CancellationException e) {
log.debug("{} was canceled", mTile);
} catch (Exception e) {
log.debug("{} {}", mTile, e.getMessage());
} finally {
mTile = null;
}
return result == QueryResult.SUCCESS;
} }
@Override @Override