]> Pileus Git - ~andy/gtk/commitdiff
Prevent unwanted recursion by resetting icon_set->cache before freeing the
authorMatthias Clasen <maclas@gmx.de>
Sat, 26 Jun 2004 05:08:36 +0000 (05:08 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 26 Jun 2004 05:08:36 +0000 (05:08 +0000)
Sat Jun 26 01:04:31 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkiconfactory.c (clear_cache): Prevent unwanted
recursion by resetting icon_set->cache before freeing
the cache.  (#144947, Tim Janik)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkiconfactory.c

index 64977af0c39369d84d1f073be4a9998ce326c457..46cbfe342f17610293704db1fc955cf2e41e4ea3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jun 26 01:04:31 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkiconfactory.c (clear_cache): Prevent unwanted 
+       recursion by resetting icon_set->cache before freeing
+       the cache.  (#144947, Tim Janik)
+
 Sat Jun 26 00:40:02 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkiconfactory.c (render_icon_name_pixbuf): 
index 64977af0c39369d84d1f073be4a9998ce326c457..46cbfe342f17610293704db1fc955cf2e41e4ea3 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jun 26 01:04:31 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkiconfactory.c (clear_cache): Prevent unwanted 
+       recursion by resetting icon_set->cache before freeing
+       the cache.  (#144947, Tim Janik)
+
 Sat Jun 26 00:40:02 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkiconfactory.c (render_icon_name_pixbuf): 
index 64977af0c39369d84d1f073be4a9998ce326c457..46cbfe342f17610293704db1fc955cf2e41e4ea3 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jun 26 01:04:31 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkiconfactory.c (clear_cache): Prevent unwanted 
+       recursion by resetting icon_set->cache before freeing
+       the cache.  (#144947, Tim Janik)
+
 Sat Jun 26 00:40:02 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkiconfactory.c (render_icon_name_pixbuf): 
index 64977af0c39369d84d1f073be4a9998ce326c457..46cbfe342f17610293704db1fc955cf2e41e4ea3 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jun 26 01:04:31 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkiconfactory.c (clear_cache): Prevent unwanted 
+       recursion by resetting icon_set->cache before freeing
+       the cache.  (#144947, Tim Janik)
+
 Sat Jun 26 00:40:02 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkiconfactory.c (render_icon_name_pixbuf): 
index 52b50e8642f7562105c6bb3ce4d2269203751183..a8dd18bd0e5f16f4a476f9069426b337c16c6a8e 100644 (file)
@@ -2654,10 +2654,13 @@ static void
 clear_cache (GtkIconSet *icon_set,
              gboolean    style_detach)
 {
-  GSList *tmp_list;
+  GSList *cache, *tmp_list;
   GtkStyle *last_style = NULL;
 
-  tmp_list = icon_set->cache;
+  cache = icon_set->cache;
+  icon_set->cache = NULL;
+  icon_set->cache_size = 0;
+  tmp_list = cache;
   while (tmp_list != NULL)
     {
       CachedIcon *icon = tmp_list->data;
@@ -2681,9 +2684,7 @@ clear_cache (GtkIconSet *icon_set,
       tmp_list = g_slist_next (tmp_list);
     }
 
-  g_slist_free (icon_set->cache);
-  icon_set->cache = NULL;
-  icon_set->cache_size = 0;
+  g_slist_free (cache);
 }
 
 static GSList*