[gtk+] listbox: Don't crash if cursor_row is NULL in real_focus



commit 7b7b8eaaff60eedc51fe9da6ab5e141863cf3752
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Sep 19 22:37:53 2013 +0200

    listbox: Don't crash if cursor_row is NULL in real_focus
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708320

 gtk/gtklistbox.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 241cf66..82a2811 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -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)))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]