From: Dana Jansens Date: Wed, 6 Jan 2010 23:58:27 +0000 (-0500) Subject: Fix a crash when moving into a menu on top of a separator and nothing is selected X-Git-Tag: release-3.4.10~1^2 X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=commitdiff_plain;h=f163c46eaf01ced8405fa36a3bf4a5c488f0f5aa;hp=f3285a3d0bf118ce0eba0014ea53b11f47d710d6 Fix a crash when moving into a menu on top of a separator and nothing is selected --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 088986f..076fe6e 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -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