GtkFontSel: Don't try to set the cursor on invalid iters
authorMatthias Clasen <mclasen@redhat.com>
Fri, 1 Jun 2012 20:58:36 +0000 (16:58 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 1 Jun 2012 20:58:36 +0000 (16:58 -0400)
This causes a lot of warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=677293

gtk/deprecated/gtkfontsel.c

index 159ac95ae22bf5cfa83fc060f7bd5dde8e9e13b8..74054ad5b962f03c31d66c538178bdb43cae0a29 100644 (file)
@@ -1055,7 +1055,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel,
              found = TRUE;
            }
 
-         gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter);
+          if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter))
+            break;
        }
 
       if (!found)