diff options
| author | Daniel MartÃn | 2023-07-13 10:47:35 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-09-07 08:21:38 +0300 |
| commit | 1458daf316475e8c07102e4886664c4fd6790432 (patch) | |
| tree | 61ec6dfc9d5927acfbec2e7039deb37c5745c1fa /src | |
| parent | 14819131fffd76fc6630f02ab53663419628f7d9 (diff) | |
| download | emacs-1458daf316475e8c07102e4886664c4fd6790432.tar.gz emacs-1458daf316475e8c07102e4886664c4fd6790432.zip | |
Avoid crashes on macOS with context menus
* src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with
context menus. (Bug#63495)
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsmenu.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m index 2c1f575bdf2..4a86864176d 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -477,6 +477,14 @@ set_frame_menubar (struct frame *f, bool deep_p) | |||
| 477 | call to ns_update_menubar. */ | 477 | call to ns_update_menubar. */ |
| 478 | - (void)menuNeedsUpdate: (NSMenu *)menu | 478 | - (void)menuNeedsUpdate: (NSMenu *)menu |
| 479 | { | 479 | { |
| 480 | |||
| 481 | /* The context menu is built and then displayed, as opposed to the | ||
| 482 | top-menu, which is partially built and then updated and filled in | ||
| 483 | when it's time to display it. Therefore, we don't call | ||
| 484 | ns_update_menubar if a context menu is active. */ | ||
| 485 | if (context_menu_value != 0) | ||
| 486 | return; | ||
| 487 | |||
| 480 | #ifdef NS_IMPL_GNUSTEP | 488 | #ifdef NS_IMPL_GNUSTEP |
| 481 | static int inside = 0; | 489 | static int inside = 0; |
| 482 | #endif | 490 | #endif |