]> err.no Git - libchamplain/commitdiff
Fix 594003: invalid write of size 4
authorFelix Riemann <friemann@gnome.org>
Thu, 3 Sep 2009 12:36:14 +0000 (08:36 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 3 Sep 2009 12:36:30 +0000 (08:36 -0400)
champlain/champlain-cache.c

index 505440ec19b16f534f7714cb9be23d972a8abe1f..ca9f99db6dfec3aec25b7d8b937a04fb145ef887 100644 (file)
@@ -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;
     }