]> Dogcows Code - chaz/openbox/commitdiff
Fix a crash when moving into a menu on top of a separator and nothing is selected
authorDana Jansens <danakj@orodu.net>
Wed, 6 Jan 2010 23:58:27 +0000 (18:58 -0500)
committerDana Jansens <danakj@orodu.net>
Wed, 6 Jan 2010 23:58:27 +0000 (18:58 -0500)
openbox/menuframe.c

index 088986f83c6ea23bd5d90c2fe2c46c3b9b263cdb..076fe6efc295ff231405ac4c4bb6a7ab6668476d 100644 (file)
@@ -1159,7 +1159,8 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
     if (entry && entry->entry->type == OB_MENU_ENTRY_TYPE_SEPARATOR)
         entry = old;
 
-    if (old == entry && (old->entry->type != OB_MENU_ENTRY_TYPE_SUBMENU))
+    if (old == entry &&
+        (!old || old->entry->type != OB_MENU_ENTRY_TYPE_SUBMENU))
         return;
 
     /* if the user left this menu but we have a submenu open, move the
This page took 0.022382 seconds and 4 git commands to generate.