From fa27215fcc3a1d11c0e95135a1c586980c01ca5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Mon, 8 Apr 2013 19:40:57 +0200 Subject: [PATCH] wIconPaint: avoid crashing if icon is NULL This patch checks that the icon exists before painting it. --- src/icon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/icon.c b/src/icon.c index 94da6945..166b8be9 100644 --- a/src/icon.c +++ b/src/icon.c @@ -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);