[PATCH 1/2] wmaker: fix crash for windows without WM_HINTS

3 views
Skip to first unread message

david.m...@gmail.com

unread,
Apr 6, 2026, 5:54:45 PMApr 6
to Window Maker Development
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;
--
2.43.0
0001-wmaker-fix-crash-for-windows-without-WM_HINTS.patch
Reply all
Reply to author
Forward
0 new messages