From: Pierre-Luc Beaudoin Date: Wed, 25 Mar 2009 06:43:05 +0000 (+0200) Subject: Fix warnings when removing a loading tile. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=871b4f3ee8865ad56a9cb576e6a8e59e183f73f4;p=libchamplain Fix warnings when removing a loading tile. --- diff --git a/champlain/champlain-map.c b/champlain/champlain-map.c index f9dce4a..a239ff4 100644 --- a/champlain/champlain-map.c +++ b/champlain/champlain-map.c @@ -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); } }