[gtk+/gtk-3-10] gtk_list_box_set_focus: Handle ist_box == NULL



commit 6c77f65ea638691e62ea50a788622742b7fa92e6
Author: Timm Bäder <mail baedert org>
Date:   Thu Oct 3 14:00:30 2013 +0200

    gtk_list_box_set_focus: Handle ist_box == NULL
    
    Rows without a parent GtkListBox can happen in Glade and its previewer.

 gtk/gtklistbox.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index c4b8d04..c438c14 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2418,6 +2418,9 @@ gtk_list_box_row_set_focus (GtkListBoxRow *row)
   GdkModifierType state = 0;
   gboolean modify_selection_pressed;
 
+  if (!list_box)
+    return;
+
   modify_selection_pressed = FALSE;
   if (gtk_get_current_event_state (&state))
     {


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