From: Christophe CURIS <christophe.cu...@free.fr>

Having the warning displayed will help devs to understand what is going
on and where to look at for a fix.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 WPrefs.app/Appearance.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 0535495..2d5acbe 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -567,6 +567,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -592,6 +593,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -625,6 +627,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -669,6 +672,11 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        image = RScaleImage(timage, width, height);
                        RReleaseImage(timage);
                        break;
+
+               default:
+                       wwarning("type '%s' in not a supported type for a 
texture", type);
+                       RReleaseImage(timage);
+                       return None;
                }
        }
 
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to