>From ac58e775bf4807d73d44625c6d07b7bfcec1a757 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Wed, 14 Nov 2012 22:11:49 +0100
Subject: [PATCH] wIconUpdate removed scr variable

The variable scr is not used, so MUST be removed.

This variable can cause a segfault because icon could not exist.
---
 src/icon.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index ba059ad..c56122f 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -593,11 +593,8 @@ static void unset_icon_image(WIcon *icon)
 
 void wIconUpdate(WIcon *icon)
 {
-       WScreen *scr = icon->core->screen_ptr;
        WWindow *wwin = icon->owner;
 
-       assert(scr->icon_tile != NULL);
-
        if (wwin && WFLAGP(wwin, always_user_icon)) {
                /* Forced use user_icon */
                get_rimage_icon_from_user_icon(icon);
-- 
1.7.10.4

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From ac58e775bf4807d73d44625c6d07b7bfcec1a757 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Wed, 14 Nov 2012 22:11:49 +0100
Subject: [PATCH] wIconUpdate removed scr variable

The variable scr is not used, so MUST be removed.

This variable can cause a segfault because icon could not exist.
---
 src/icon.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index ba059ad..c56122f 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -593,11 +593,8 @@ static void unset_icon_image(WIcon *icon)
 
 void wIconUpdate(WIcon *icon)
 {
-	WScreen *scr = icon->core->screen_ptr;
 	WWindow *wwin = icon->owner;
 
-	assert(scr->icon_tile != NULL);
-
 	if (wwin && WFLAGP(wwin, always_user_icon)) {
 		/* Forced use user_icon */
 		get_rimage_icon_from_user_icon(icon);
-- 
1.7.10.4

Reply via email to