[libchamplain] Set the polygons list to NULL after the free in champlain_view_dispose().
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Set the polygons list to NULL after the free in champlain_view_dispose().
- Date: Thu, 25 Jun 2009 17:12:48 +0000 (UTC)
commit 6e3058df141390771fb6ebcc2cc8284acb36202b
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Wed Jun 17 21:00:55 2009 +0200
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.
champlain/champlain-view.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]