diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index 684fc07d..d570eba1 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -582,10 +582,10 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height, str = PLGetString(PLGetArrayElement(texture, 1)); - path = wfindfileinarray(GetObjectForKey("PixmapPath"), str); - timage = RLoadImage(rc, path, 0); + if (path = wfindfileinarray(GetObjectForKey("PixmapPath"), str)) + timage = RLoadImage(rc, path, 0); - if (!timage) { + if (!path || !timage) { wwarning("could not load file '%s': %s", path, RMessageForError(RErrorCode)); } else {