don't crash when you press enter with nothing selected in the menu
authorMikael Magnusson <mikachu@comhem.se>
Sun, 27 May 2007 18:57:51 +0000 (18:57 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 27 May 2007 18:57:51 +0000 (18:57 +0000)
openbox/event.c

index e03c820..3bfca98 100644 (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);
     }