mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
wIconPaint: avoid crashing if icon is NULL
This patch checks that the icon exists before painting it.
This commit is contained in:
committed by
Carlos R. Mafra
parent
8cb744739c
commit
fa27215fcc
@@ -755,6 +755,9 @@ static void update_icon_title(WIcon *icon)
|
||||
|
||||
void wIconPaint(WIcon *icon)
|
||||
{
|
||||
if (!icon || !icon->core || !icon->core->screen_ptr)
|
||||
return;
|
||||
|
||||
WScreen *scr = icon->core->screen_ptr;
|
||||
|
||||
XClearWindow(dpy, icon->core->window);
|
||||
|
||||
Reference in New Issue
Block a user