mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Fix #13083 segfault in SDL_RemoveTrayEntry() for submenu entries
Use `g_object_ref_sink()` in `SDL_CreateTraySubmenu()` as introduced with
3be67ced64 for the top-level menu.
This commit is contained in:
committed by
Sam Lantinga
parent
264eb8d440
commit
22828d5f2a
@@ -541,7 +541,7 @@ SDL_TrayMenu *SDL_CreateTraySubmenu(SDL_TrayEntry *entry)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
entry->submenu->menu = (GtkMenuShell *)gtk_menu_new();
|
||||
entry->submenu->menu = g_object_ref_sink(gtk_menu_new());
|
||||
entry->submenu->parent_tray = NULL;
|
||||
entry->submenu->parent_entry = entry;
|
||||
entry->submenu->nEntries = 0;
|
||||
|
||||
Reference in New Issue
Block a user