]> err.no Git - libchamplain/commitdiff
Fix warnings when removing a loading tile.
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Wed, 25 Mar 2009 06:43:05 +0000 (08:43 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Wed, 25 Mar 2009 06:43:05 +0000 (08:43 +0200)
champlain/champlain-map.c

index f9dce4a7f135882759c16ba4023f8d3c9a2f4699..a239ff42b3273d4898af53469ee673e2274eacdc 100644 (file)
@@ -94,9 +94,12 @@ map_load_visible_tiles (Map *map, ChamplainView *view, ChamplainMapSource *sourc
           tile_y < y_first || tile_y > y_count)
       {
         ClutterActor *group, *actor;
-        actor = champlain_tile_get_actor (tile);
-        group = champlain_zoom_level_get_actor (map->current_level);
-        clutter_container_remove_actor (CLUTTER_CONTAINER (group), actor);
+        if (champlain_tile_get_state (tile) == CHAMPLAIN_STATE_DONE)
+          {
+            actor = champlain_tile_get_actor (tile);
+            group = champlain_zoom_level_get_actor (map->current_level);
+            clutter_container_remove_actor (CLUTTER_CONTAINER (group), actor);
+          }
         champlain_zoom_level_remove_tile (map->current_level, tile);
       }
     }