mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-08 17:03:31 +02:00
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))]
This commit is contained in:
committed by
Carlos R. Mafra
parent
62e341b5cc
commit
ee9fd77a56
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user