--- a/ui/motif/toolkit.c Sun Jan 11 15:10:20 2026 +0100 +++ b/ui/motif/toolkit.c Mon Jan 12 20:54:27 2026 +0100 @@ -156,8 +156,12 @@ void ui_show(UiObject *obj) { uic_check_state_widgets(obj->ctx); - if(!XtIsRealized(obj->widget)) { - XtRealizeWidget(obj->widget); + if(obj->widget) { + if(!XtIsRealized(obj->widget)) { + XtRealizeWidget(obj->widget); + obj->ref++; + } + } else { obj->ref++; } }