fix: always initialize TileManager

This commit is contained in:
Hannes Janetzek 2014-01-21 02:52:34 +01:00
parent c88d5707ad
commit 652024c5dc

View File

@ -165,6 +165,11 @@ public class TileManager {
* current MapPosition * current MapPosition
*/ */
public boolean update(MapPosition pos) { public boolean update(MapPosition pos) {
// FIXME cant expect init to be called otherwise
if (mNewTiles == null)
init();
// clear JobQueue and set tiles to state == NONE. // clear JobQueue and set tiles to state == NONE.
// one could also append new tiles and sort in JobQueue // one could also append new tiles and sort in JobQueue
// but this has the nice side-effect that MapWorkers dont // but this has the nice side-effect that MapWorkers dont