[gtk+] GtkFontSel: Don't try to set the cursor on invalid iters



commit eeb52995739773a7ef979c54299e7c93595e8fb0
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jun 1 16:58:36 2012 -0400

    GtkFontSel: Don't try to set the cursor on invalid iters
    
    This causes a lot of warnings.
    https://bugzilla.gnome.org/show_bug.cgi?id=677293

 gtk/deprecated/gtkfontsel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/deprecated/gtkfontsel.c b/gtk/deprecated/gtkfontsel.c
index 159ac95..74054ad 100644
--- a/gtk/deprecated/gtkfontsel.c
+++ b/gtk/deprecated/gtkfontsel.c
@@ -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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]