mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00: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:
parent
264eb8d440
commit
22828d5f2a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue