From: Christophe CURIS <[email protected]>

It makes code simpler and less prone to errors.
---
 WPrefs.app/Appearance.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 21dad63..ce54e3f 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -512,13 +512,13 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);
                if (path != NULL) {
                        timage = RLoadImage(rc, path, 0);
+                       if (timage != NULL) {
+                               wwarning("could not load file '%s': %s", path ? 
path : str, RMessageForError(RErrorCode));
+                               texture = 
WMCreatePropListFromDescription("(solid, black)");
+                               type = "solid";
+                       }
+                       wfree(path);
                }
-               if (!path || !timage) {
-                       wwarning("could not load file '%s': %s", path ? path : 
str, RMessageForError(RErrorCode));
-                       texture = WMCreatePropListFromDescription("(solid, 
black)");
-                       type = "solid";
-               }
-               wfree(path);
        }
 
        if (strcasecmp(type, "solid") == 0) {
-- 
1.9.2


-- 
To unsubscribe, send mail to [email protected].

Reply via email to