From c2cbce6d842365c30ca5fa5d78d86a55fcb1b92d Mon Sep 17 00:00:00 2001 From: id Date: Sat, 11 Dec 1999 02:34:07 +0000 Subject: [PATCH] fix an assert crash. --- WPrefs.app/Appearance.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {