diff -r 493959648de6 -r 5a3d27b8e6b0 ui/gtk/text.c --- a/ui/gtk/text.c Wed Nov 27 18:53:11 2024 +0100 +++ b/ui/gtk/text.c Thu Nov 28 18:03:12 2024 +0100 @@ -112,8 +112,8 @@ current->container->add(current->container, scroll_area, TRUE); // bind value - UiText *value = var->value; - if(value) { + if(var) { + UiText *value = var->value; GtkTextBuffer *buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_area)); if(value->value.ptr) { @@ -165,7 +165,9 @@ } void ui_textarea_destroy(GtkWidget *object, UiTextArea *textarea) { - ui_destroy_boundvar(textarea->ctx, textarea->var); + if(textarea->var) { + ui_destroy_boundvar(textarea->ctx, textarea->var); + } free(textarea); }