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);