]> err.no Git - libchamplain/commitdiff
Set the polygons list to NULL after the free in champlain_view_dispose().
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Wed, 17 Jun 2009 19:00:55 +0000 (21:00 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 23 Jun 2009 16:37:36 +0000 (12:37 -0400)
If the list isn't set to NULL then an application would have wrong memory
access in the case where dispose is called twice for the same object. This
happens on the demo launcher-gtk.

champlain/champlain-view.c

index 28f56e34b021df577be0c5e642f6b3cd669366ac..61329b35a6e48a26a892a637666b6a3f081248b0 100644 (file)
@@ -719,6 +719,7 @@ champlain_view_dispose (GObject *object)
       polygons = polygons->next;
     }
   g_list_free (priv->polygons);
+  priv->polygons = NULL;
 
   if (priv->goto_context != NULL)
     champlain_view_stop_go_to (view);