From 871b4f3ee8865ad56a9cb576e6a8e59e183f73f4 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Wed, 25 Mar 2009 08:43:05 +0200 Subject: [PATCH] Fix warnings when removing a loading tile. --- champlain/champlain-map.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); } } -- 2.39.5