From: Emmanuel Rodriguez Date: Wed, 17 Jun 2009 19:00:55 +0000 (+0200) Subject: Set the polygons list to NULL after the free in champlain_view_dispose(). X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e3058df141390771fb6ebcc2cc8284acb36202b;p=libchamplain Set the polygons list to NULL after the free in champlain_view_dispose(). 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. --- diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index 28f56e3..61329b3 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -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);