diff -r a0ea718ab1d8 -r 24d9a92fd048 ui/gtk/toolkit.c --- a/ui/gtk/toolkit.c Fri Feb 16 18:33:34 2024 +0100 +++ b/ui/gtk/toolkit.c Fri Feb 16 19:00:53 2024 +0100 @@ -247,7 +247,9 @@ } void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data) { - ui_destroy_boundvar(data->obj->ctx, data->var); + if(data->var) { + ui_destroy_boundvar(data->obj->ctx, data->var); + } free(data); }