From d4ebd574d22306af5af38217a5792bee7301331f Mon Sep 17 00:00:00 2001 From: dan Date: Sun, 17 Oct 1999 00:38:35 +0000 Subject: [PATCH] Fixed crashing bug in WPrefs.app's appereance section. --- WPrefs.app/Appearance.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index c37fdebe..f188d893 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -434,7 +434,7 @@ isPixmap(proplist_t prop) { proplist_t p; char *s; - + p = PLGetArrayElement(prop, 0); s = PLGetString(p); if (strcasecmp(&s[1], "pixmap")==0) @@ -1970,7 +1970,8 @@ setupTextureFor(WMList *list, char *key, char *defValue, char *title, titem->title = wstrdup(title); titem->prop = GetObjectForKey(key); - if (!titem->prop) { + if (!titem->prop || !PLIsArray(titem->prop)) { + /* Maybe also give a error message to stderr that the entry is bad? */ titem->prop = PLGetProplistWithDescription(defValue); } else { PLRetain(titem->prop);