From 47744e03c3016e98940a4ce6393d9f6403ca794c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 27 May 2007 18:57:51 +0000 Subject: [PATCH] don't crash when you press enter with nothing selected in the menu --- openbox/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.44.0