From e448a8ed4e1bf989ef472b61ac13e161b6a1e53c Mon Sep 17 00:00:00 2001 From: Nishi Date: Wed, 13 May 2026 14:41:35 +0900 Subject: [PATCH] fix --- src/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index f330e49..4fd2645 100644 --- a/src/core.c +++ b/src/core.c @@ -585,9 +585,11 @@ void MwSetInteger(MwWidget handle, const char* key, int n) { shdel(h->integer, MwNdarkThemeAutomatic); - while(h->parent != NULL && h->parent->widget_class != MwWindowClass) h = h->parent; + if(h->widget_class != MwWindowClass) { + while(h->parent != NULL && h->parent->widget_class != MwWindowClass) h = h->parent; + } - MwLLSetDarkTheme(h->lowlevel, n); + if(h->lowlevel != NULL) MwLLSetDarkTheme(h->lowlevel, n); } }