From: Emmanuel Rodriguez Date: Wed, 29 Jul 2009 20:26:05 +0000 (+0200) Subject: Fix a memory bug in champlain_polygon_clear_points() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7d2e9aefd6b119655ddc25848283a149cd48b3c;p=libchamplain Fix a memory bug in champlain_polygon_clear_points() Clearing the points is now initializing the list to NULL. This causes the list to be reusable. Otherwise points can't be added to it afterwards. --- diff --git a/champlain/champlain-polygon.c b/champlain/champlain-polygon.c index 1bdcd6d..8567c20 100644 --- a/champlain/champlain-polygon.c +++ b/champlain/champlain-polygon.c @@ -391,6 +391,7 @@ champlain_polygon_clear_points (ChamplainPolygon *self) next = g_list_next (next); } g_list_free (self->priv->points); + self->priv->points = NULL; g_object_notify (G_OBJECT (self), "visible"); }