mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +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)
|
void wIconPaint(WIcon *icon)
|
||||||
{
|
{
|
||||||
|
if (!icon || !icon->core || !icon->core->screen_ptr)
|
||||||
|
return;
|
||||||
|
|
||||||
WScreen *scr = icon->core->screen_ptr;
|
WScreen *scr = icon->core->screen_ptr;
|
||||||
|
|
||||||
XClearWindow(dpy, icon->core->window);
|
XClearWindow(dpy, icon->core->window);
|
||||||
|
|||||||
Reference in New Issue
Block a user