mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-24 04:16:41 +00:00
Fix #13083 segfault in SDL_RemoveTrayEntry() for submenu entries
Use `g_object_ref_sink()` in `SDL_CreateTraySubmenu()` as introduced with3be67ced64for the top-level menu. (cherry picked from commit22828d5f2a)
This commit is contained in:
committed by
Sam Lantinga
parent
26a1aae098
commit
e5c0e5efa7
@@ -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