summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2013-10-21 16:21:11 +0200
committerDebarshi Ray <debarshir@gnome.org>2013-10-21 16:21:11 +0200
commit65dd26d3f35b0fa32f461eaee9eace53520f1f03 (patch)
tree68609f9e3fa0343742fa65da9faaf6858d78de64 /gtk
parent3971ed1779862c8bbf2280f8dc1e1c11ae8a1c37 (diff)
downloadgtk+-65dd26d3f35b0fa32f461eaee9eace53520f1f03.tar.gz
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
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkflowbox.c3
1 files changed, 3 insertions, 0 deletions
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)))