mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
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
This commit is contained in:
parent
3971ed1779
commit
65dd26d3f3
@ -1215,6 +1215,9 @@ gtk_flow_box_get_first_focusable (GtkFlowBox *box)
|
|||||||
GtkFlowBoxChild *child;
|
GtkFlowBoxChild *child;
|
||||||
|
|
||||||
iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children);
|
iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children);
|
||||||
|
if (g_sequence_iter_is_end (iter))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
child = g_sequence_get (iter);
|
child = g_sequence_get (iter);
|
||||||
if (child_is_visible (GTK_WIDGET (child)) &&
|
if (child_is_visible (GTK_WIDGET (child)) &&
|
||||||
gtk_widget_is_sensitive (GTK_WIDGET (child)))
|
gtk_widget_is_sensitive (GTK_WIDGET (child)))
|
||||||
|
Loading…
Reference in New Issue
Block a user