ui/gtk/toolkit.c

branch
newapi
changeset 264
24d9a92fd048
parent 263
a0ea718ab1d8
child 275
132c7bcc6997
equal deleted inserted replaced
263:a0ea718ab1d8 264:24d9a92fd048
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);

mercurial