summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2007-05-27 18:57:51 +0000
committerMikael Magnusson <mikachu@comhem.se>2007-05-27 18:57:51 +0000
commit47744e03c3016e98940a4ce6393d9f6403ca794c (patch)
treef19fa866fe3771c5ac12952f1c04cdaac05ef5db
parent7f9080c6a0679aab23e7519dcc6d8498f4e28a0f (diff)
don't crash when you press enter with nothing selected in the menu
-rw-r--r--openbox/event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbox/event.c b/openbox/event.c
index e03c8203..3bfca98e 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -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);
}