From: Felix Riemann Date: Thu, 3 Sep 2009 12:36:14 +0000 (-0400) Subject: Fix 594003: invalid write of size 4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=209f9f85b0528063bca9a233da9e6841166ffba4;p=libchamplain Fix 594003: invalid write of size 4 --- diff --git a/champlain/champlain-cache.c b/champlain/champlain-cache.c index 505440e..ca9f99d 100644 --- a/champlain/champlain-cache.c +++ b/champlain/champlain-cache.c @@ -431,7 +431,9 @@ champlain_cache_fill_tile (ChamplainCache *self, if (priv->popularity_id == 0) { g_object_ref (self); - priv->popularity_id = g_idle_add (inc_popularity, self); + priv->popularity_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + inc_popularity, self, + g_object_unref); } cleanup: @@ -479,7 +481,6 @@ inc_popularity (gpointer data) if (priv->popularity_queue == NULL) { - g_object_unref (cache); priv->popularity_id = 0; return FALSE; }