mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Fix bad deallocation of context menus
This commit is contained in:
parent
26a291dbee
commit
e6491bcbb7
1 changed files with 5 additions and 0 deletions
|
|
@ -62,6 +62,11 @@ int freeContextMenu(void *const context, struct hashmap_element_s *const e) {
|
|||
|
||||
void DeleteContextMenuStore(ContextMenuStore* store) {
|
||||
|
||||
// Guard against NULLs
|
||||
if( store == NULL ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete context menus
|
||||
if( hashmap_num_entries(&store->contextMenuStore) > 0 ) {
|
||||
if (0 != hashmap_iterate_pairs(&store->contextMenuStore, freeContextMenu, NULL)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue