From 692f60ebb0f33d6b0abe1ffbd0a43d212777fbf2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 26 Aug 2015 19:57:15 -0400 Subject: [PATCH] flow box: Avoid a critical in keynav We were not taking into account that gtk_flow_box_get_next_focusable can return NULL, in all callers. Fix that. --- gtk/gtkflowbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index c19130e6af..8b65d65ecf 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -3459,7 +3459,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box, while (!g_sequence_iter_is_end (iter)) { iter = gtk_flow_box_get_next_focusable (box, iter); - if (g_sequence_iter_is_end (iter)) + if (iter == NULL || g_sequence_iter_is_end (iter)) break; next = g_sequence_get (iter);