don't try go to selected submenu when there is nothing selected
authorDana Jansens <danakj@orodu.net>
Thu, 29 Apr 2010 20:11:17 +0000 (16:11 -0400)
committerDana Jansens <danakj@orodu.net>
Thu, 29 Apr 2010 20:14:16 +0000 (16:14 -0400)
openbox/event.c

index 41f3b08..8a5720a 100644 (file)
@@ -1862,7 +1862,8 @@ static gboolean event_handle_menu_input(XEvent *ev)
 
             else if (sym == XK_Right) {
                 /* Right goes to the selected submenu */
-                if (frame->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU)
+                if (frame->selected &&
+                    frame->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU)
                 {
                     /* make sure it is visible */
                     menu_frame_select(frame, frame->selected, TRUE);