From c4c42d9ff64af9c25e5afca01e9f58d617cabe0f Mon Sep 17 00:00:00 2001 From: id Date: Sat, 11 Dec 1999 21:22:56 +0000 Subject: [PATCH] fix an assert crash. --- WPrefs.app/Appearance.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index d570eba1..ca31fc6d 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -642,11 +642,10 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height, str = PLGetString(PLGetArrayElement(texture, 1)); - path = wfindfileinarray(GetObjectForKey("PixmapPath"), str); - if (path) - 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 ? path : str, RMessageForError(RErrorCode)); } else {