]> err.no Git - libchamplain/commitdiff
Also unref the previous level
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 28 May 2009 04:38:01 +0000 (00:38 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 28 May 2009 04:38:01 +0000 (00:38 -0400)
champlain/champlain-map.c

index 6c01938e030b194a886088f475feec9ebb826b17..3f188476aaa560f22a4de226db2837eb0dc1c591 100644 (file)
@@ -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);
 }