Skip to content

Commit 530aa0a

Browse files
author
richard
committed
not a great fan of mixed-type arrays but this will do for now...
git-svn-id: http://svn.openstreetmap.org/applications/editors/potlatch2@25535 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
1 parent 6ce1a61 commit 530aa0a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

net/systemeD/halcyon/TileSet.as

+7-5
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,13 @@ package net.systemeD.halcyon {
199199

200200
protected function purgeTiles():void {
201201
for (var tile:String in tiles) {
202-
var coords:Array=tile.split(','); var tz:uint=coords[0]; var tx:uint=coords[1]; var ty:uint=coords[1];
203-
if (tz!=map.scale || tx<tile_l || tx>tile_r || ty<tile_t || ty<tile_b) {
204-
if (tiles[tile].parent) tiles[tile].parent.removeChild(tiles[tile]);
205-
delete tiles[tile];
206-
loadcount--;
202+
if (tiles[tile] is Sprite) {
203+
var coords:Array=tile.split(','); var tz:uint=coords[0]; var tx:uint=coords[1]; var ty:uint=coords[1];
204+
if (tz!=map.scale || tx<tile_l || tx>tile_r || ty<tile_t || ty<tile_b) {
205+
if (tiles[tile].parent) tiles[tile].parent.removeChild(tiles[tile]);
206+
delete tiles[tile];
207+
loadcount--;
208+
}
207209
}
208210
}
209211
}

0 commit comments

Comments
 (0)