mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
listbox: Don't crash if cursor_row is NULL in real_focus
https://bugzilla.gnome.org/show_bug.cgi?id=708320
This commit is contained in:
parent
e6ac9b0862
commit
7b7b8eaaff
@ -1343,7 +1343,7 @@ gtk_list_box_real_focus (GtkWidget *widget,
|
||||
|
||||
if (direction == GTK_DIR_UP || direction == GTK_DIR_TAB_BACKWARD)
|
||||
{
|
||||
i = gtk_list_box_get_previous_visible (list_box, ROW_PRIV (priv->cursor_row)->iter);
|
||||
i = gtk_list_box_get_previous_visible (list_box, ROW_PRIV (GTK_LIST_BOX_ROW (focus_child))->iter);
|
||||
while (i != NULL)
|
||||
{
|
||||
if (gtk_widget_get_sensitive (g_sequence_get (i)))
|
||||
@ -1357,7 +1357,7 @@ gtk_list_box_real_focus (GtkWidget *widget,
|
||||
}
|
||||
else if (direction == GTK_DIR_DOWN || direction == GTK_DIR_TAB_FORWARD)
|
||||
{
|
||||
i = gtk_list_box_get_next_visible (list_box, ROW_PRIV (priv->cursor_row)->iter);
|
||||
i = gtk_list_box_get_next_visible (list_box, ROW_PRIV (GTK_LIST_BOX_ROW (focus_child))->iter);
|
||||
while (!g_sequence_iter_is_end (i))
|
||||
{
|
||||
if (gtk_widget_get_sensitive (g_sequence_get (i)))
|
||||
|
Loading…
Reference in New Issue
Block a user