# HG changeset patch # User Olaf Wintermann <olaf.wintermann@gmail.com> # Date 1743941503 -7200 # Node ID 62aefa91ffc54c00d62a7729fbef739fe13d1f58 # Parent e6415fd4af4b1c104c5d604e1cfaeafd786aa1a4 fix potential crash in menuitem_list_remove_binding diff -r e6415fd4af4b -r 62aefa91ffc5 ui/gtk/menu.c --- a/ui/gtk/menu.c Sun Apr 06 14:10:04 2025 +0200 +++ b/ui/gtk/menu.c Sun Apr 06 14:11:43 2025 +0200 @@ -281,7 +281,7 @@ cxListAdd(bindings, ls); // The destruction of the toplevel obj must remove the menulist binding - cxMempoolRegister(obj->ctx->mp, ls, menuitem_list_remove_binding); + uic_context_add_destructor(obj->ctx, menuitem_list_remove_binding, ls); ui_update_menuitem_list(ls); } @@ -595,7 +595,7 @@ cxListAdd(bindings, ls); // The destruction of the toplevel obj must remove the menulist binding - cxMempoolRegister(obj->ctx->mp, ls, menuitem_list_remove_binding); + uic_context_add_destructor(obj->ctx, menuitem_list_remove_binding, ls); ui_update_gmenu_item_list(ls); }