diff --git a/v2/internal/ffenestri/contextmenus_darwin.h b/v2/internal/ffenestri/contextmenus_darwin.h index e070912a9..325246bf3 100644 --- a/v2/internal/ffenestri/contextmenus_darwin.h +++ b/v2/internal/ffenestri/contextmenus_darwin.h @@ -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)) {