From adaa3e0aebd8eb8906600ddc3d1d2d86d6e5ec18 Mon Sep 17 00:00:00 2001 From: id Date: Sat, 11 Dec 1999 21:37:58 +0000 Subject: [PATCH] another assert crash. --- WPrefs.app/TexturePanel.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/WPrefs.app/TexturePanel.c b/WPrefs.app/TexturePanel.c index c0f20f61..a7880e5e 100644 --- a/WPrefs.app/TexturePanel.c +++ b/WPrefs.app/TexturePanel.c @@ -926,15 +926,17 @@ SetTexturePanelTexture(TexturePanel *panel, char *name, proplist_t texture) WMSetTextFieldText(panel->imageT, PLGetString(PLGetArrayElement(texture, 1))); - if (panel->imageFile) - free(panel->imageFile); - panel->imageFile = wfindfileinarray(panel->pathList, - PLGetString(PLGetArrayElement(texture, 1))); + if (panel->imageFile) + free(panel->imageFile); + if (panel->imageFile = wfindfileinarray(panel->pathList, + PLGetString(PLGetArrayElement(texture, 1)))) { - panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0); - updateTGradImage(panel); - - updateSGradButtons(panel); + panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0); + updateTGradImage(panel); + + updateSGradButtons(panel); + } else wwarning("could not load file '%s': %s", panel->imageFile, + RMessageForError(RErrorCode)); /*...............................................*/ } else if (strcasecmp(type, "mhgradient")==0