Sat, 30 Nov 2024 20:33:16 +0100
fix radiobutton destroy callback (GTK)
ui/gtk/button.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/button.c Sat Nov 30 20:13:09 2024 +0100 +++ b/ui/gtk/button.c Sat Nov 30 20:33:16 2024 +0100 @@ -398,12 +398,14 @@ } UiRadioButtonData; static void destroy_radiobutton(GtkWidget *w, UiRadioButtonData *data) { - ui_destroy_vardata(w, data->eventdata); if(data->first) { + ui_destroy_vardata(w, data->eventdata); g_slist_free(data->value->obj); data->value->obj = NULL; data->value->get = NULL; data->value->set = NULL; + } else { + free(data->eventdata); } free(data); }