1
0
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:
Rodolfo García Peñas (kix)
2013-04-08 19:40:57 +02:00
committed by Carlos R. Mafra
parent 8cb744739c
commit fa27215fcc

View File

@@ -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);