245 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
245 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
246 free(userdata); |
246 free(userdata); |
247 } |
247 } |
248 |
248 |
249 void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data) { |
249 void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data) { |
250 ui_destroy_boundvar(data->obj->ctx, data->var); |
250 if(data->var) { |
|
251 ui_destroy_boundvar(data->obj->ctx, data->var); |
|
252 } |
251 free(data); |
253 free(data); |
252 } |
254 } |
253 |
255 |
254 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
256 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
255 uic_unbind_var(var); |
257 uic_unbind_var(var); |