Avoid crashes on macOS with context menus
* src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with context menus. (Bug#63495)
This commit is contained in:
parent
14819131ff
commit
1458daf316
1 changed files with 8 additions and 0 deletions
|
@ -477,6 +477,14 @@ - (instancetype)initWithTitle: (NSString *)title
|
|||
call to ns_update_menubar. */
|
||||
- (void)menuNeedsUpdate: (NSMenu *)menu
|
||||
{
|
||||
|
||||
/* The context menu is built and then displayed, as opposed to the
|
||||
top-menu, which is partially built and then updated and filled in
|
||||
when it's time to display it. Therefore, we don't call
|
||||
ns_update_menubar if a context menu is active. */
|
||||
if (context_menu_value != 0)
|
||||
return;
|
||||
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
static int inside = 0;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue