From ee9fd77a5600d73ca9069aa558dc7aa9b20b5b52 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Sat, 4 Apr 2026 15:49:04 -0400 Subject: [PATCH] wmaker: fix crash for windows without WM_HINTS This patch is adding a guard before calling wm_hints->icon_pixmap. Crash can be reproduced with decoration-less apps when disabling "Emulate application icon" attribute. Ref: Program terminated with signal SIGSEGV, Segmentation fault. 806 if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) { [Current thread is 1 (Thread 0x7ffff660ed40 (LWP 29297))] --- src/icon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/icon.c b/src/icon.c index 790bfd29..9e3c89a4 100644 --- a/src/icon.c +++ b/src/icon.c @@ -803,6 +803,9 @@ RImage *get_rimage_icon_from_wm_hints(WIcon *icon) wwin = icon->owner; + if (!wwin->wm_hints) + return NULL; + if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) { icon->owner->wm_hints->flags &= ~IconPixmapHint; return NULL;