From: Pierre-Luc Beaudoin Date: Thu, 28 May 2009 04:38:01 +0000 (-0400) Subject: Also unref the previous level X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67ebb49dc04174705f54a6a571e282d197fb178f;p=libchamplain Also unref the previous level --- diff --git a/champlain/champlain-map.c b/champlain/champlain-map.c index 6c01938..3f18847 100644 --- a/champlain/champlain-map.c +++ b/champlain/champlain-map.c @@ -84,7 +84,10 @@ map_zoom_out (Map *map, void map_free (Map *map) { - g_object_unref (map->current_level); + if (map->previous_level != NULL) + g_object_unref (map->previous_level); + if (map->current_level != NULL) + g_object_unref (map->current_level); g_free (map); }