Fix a crash when moving into a menu on top of a separator and nothing is selected
This commit is contained in:
parent
f3285a3d0b
commit
f163c46eaf
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue