don't try go to selected submenu when there is nothing selected

This commit is contained in:
Dana Jansens 2010-04-29 16:11:17 -04:00
parent b9b0284e3e
commit 523a726c6c

View file

@ -1862,7 +1862,8 @@ static gboolean event_handle_menu_input(XEvent *ev)
else if (sym == XK_Right) { else if (sym == XK_Right) {
/* Right goes to the selected submenu */ /* 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 */ /* make sure it is visible */
menu_frame_select(frame, frame->selected, TRUE); menu_frame_select(frame, frame->selected, TRUE);