>From 4081ff0c2f81dd016db0ec133ea701df36967e0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 7 Jun 2012 23:26:26 +0200
Subject: [PATCH 10/10] image is initialized to NULL
The struct RImage image must be initialized to NULL, because
if the if conditional is false, then the value returned by
get_wwindow_image_from_wmhints is randon.
---
src/icon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 8cf8d33..d33dfa5 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -499,16 +499,16 @@ static char *get_icon_cache_path(void)
static RImage *get_wwindow_image_from_wmhints(WWindow *wwin, WIcon *icon)
{
- RImage *image;
+ RImage *image = NULL;
if (wwin->wm_hints &&
(wwin->wm_hints->flags & IconPixmapHint) &&
- wwin->wm_hints->icon_pixmap != None) {
+ wwin->wm_hints->icon_pixmap != None)
image =
RCreateImageFromDrawable(icon->core->screen_ptr->rcontext,
wwin->wm_hints->icon_pixmap,
(wwin->wm_hints->flags &
IconMaskHint)
? wwin->wm_hints->icon_mask :
None);
- }
+
return image;
}
--
1.7.10
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 4081ff0c2f81dd016db0ec133ea701df36967e0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 7 Jun 2012 23:26:26 +0200
Subject: [PATCH 10/10] image is initialized to NULL
The struct RImage image must be initialized to NULL, because
if the if conditional is false, then the value returned by
get_wwindow_image_from_wmhints is randon.
---
src/icon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 8cf8d33..d33dfa5 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -499,16 +499,16 @@ static char *get_icon_cache_path(void)
static RImage *get_wwindow_image_from_wmhints(WWindow *wwin, WIcon *icon)
{
- RImage *image;
+ RImage *image = NULL;
if (wwin->wm_hints &&
(wwin->wm_hints->flags & IconPixmapHint) &&
- wwin->wm_hints->icon_pixmap != None) {
+ wwin->wm_hints->icon_pixmap != None)
image = RCreateImageFromDrawable(icon->core->screen_ptr->rcontext,
wwin->wm_hints->icon_pixmap,
(wwin->wm_hints->flags & IconMaskHint)
? wwin->wm_hints->icon_mask : None);
- }
+
return image;
}
--
1.7.10