[egg-list-box] focus: cope with cursor_child being null



commit f43820e357546b2636308e944e6c77c803adabc8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Jun 8 10:13:02 2012 +0200

    focus: cope with cursor_child being null
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677680

 egg-list-box.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/egg-list-box.vala b/egg-list-box.vala
index b4a8f2d..370e6d2 100644
--- a/egg-list-box.vala
+++ b/egg-list-box.vala
@@ -487,8 +487,8 @@ public class Egg.ListBox : Container {
     if (had_focus) {
       /* If on row, going right, enter into possible container */
       if (direction == DirectionType.RIGHT || direction == DirectionType.TAB_FORWARD) {
-        /* TODO: Handle null cursor child */
-        recurse_into = cursor_child.widget;
+        if (cursor_child != null)
+          recurse_into = cursor_child.widget;
       }
       current_focus_child = cursor_child;
       /* Unless we're going up/down we're always leaving



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