[gtk+] gtk_list_box_set_focus: Handle ist_box == NULL



commit 01d278a74ff93892a9e61cf112105ba7fd22b97b
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 d94c966..bcff01b 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2420,6 +2420,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]