don't crash when you press enter with nothing selected in the menu

This commit is contained in:
Mikael Magnusson 2007-05-27 18:57:51 +00:00
parent 7f9080c6a0
commit 47744e03c3

View file

@ -1566,7 +1566,7 @@ static gboolean event_handle_menu_keyboard(XEvent *ev)
Control-Enter runs it without closing the menu. */
if (frame->child)
menu_frame_select_next(frame->child);
else
else if (frame->selected)
menu_entry_frame_execute(frame->selected, state, ev->xkey.time);
}