From 65dd26d3f35b0fa32f461eaee9eace53520f1f03 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 21 Oct 2013 16:21:11 +0200 Subject: [PATCH] flowbox: Be careful when the container is empty Otherwise, showing an empty GtkFlowBox will lead to: GLib-CRITICAL **: g_sequence_get: assertion '!is_end (iter)' failed --- gtk/gtkflowbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index e9c6367f40..0bac89b3ae 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -1215,6 +1215,9 @@ gtk_flow_box_get_first_focusable (GtkFlowBox *box) GtkFlowBoxChild *child; iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children); + if (g_sequence_iter_is_end (iter)) + return NULL; + child = g_sequence_get (iter); if (child_is_visible (GTK_WIDGET (child)) && gtk_widget_is_sensitive (GTK_WIDGET (child)))