]> Pileus Git - ~andy/gtk/commitdiff
Avoid a crash
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 14 Nov 2005 18:49:41 +0000 (18:49 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 14 Nov 2005 18:49:41 +0000 (18:49 +0000)
ChangeLog
ChangeLog.pre-2-10
gtk/gtkicontheme.c

index b9e61bb0329c57f72e6e574b54bf3a9cb85fc905..1a24006a1ecd9d0bae21cf0bf9e048cd8124cca0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
+       Don't crash if there is no builtin icon.
+
 2005-11-14  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_set_property):
index b9e61bb0329c57f72e6e574b54bf3a9cb85fc905..1a24006a1ecd9d0bae21cf0bf9e048cd8124cca0 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
+       Don't crash if there is no builtin icon.
+
 2005-11-14  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_set_property):
index bfce170709363ae77689b9125586ea970028eb73..2e9ef1f3e02e91b63c997c46efc8b333f23758c4 100644 (file)
@@ -1517,12 +1517,13 @@ gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme,
     {
       icons = g_hash_table_lookup (icon_theme_builtin_icons, icon_name);
       
-      for ( ; icons; icons = icons->next);
-      {
-       BuiltinIcon *icon = icons->data;
+      while (icons)
+        {
+         BuiltinIcon *icon = icons->data;
        
-       g_hash_table_insert (sizes, GINT_TO_POINTER (icon->size), NULL);
-      }      
+         g_hash_table_insert (sizes, GINT_TO_POINTER (icon->size), NULL);
+          icons = icons->next;
+        }      
     }
 
   r = result = g_new0 (gint, g_hash_table_size (sizes) + 1);