rem: fullpath = WMGetFilePanelFileName(opanel); if (!fullpath)
add: tmp = WMGetFilePanelFileName(opanel); if (!tmp)
context: browseImageCallback(WMWidget *w, void *data){    TexturePanel *panel = (TexturePanel*)data;    WMOpenPanel *opanel;    WMScreen *scr = WMWidgetScreen(w);    opanel = WMGetOpenPanel(scr);    WMSetFilePanelCanChooseDirectories(opanel, False);    WMSetFilePanelCanChooseFiles(opanel, True);    if (WMRunModalFilePanelForDirectory(opanel, panel->win, wgethomedir(),					"Open Image", NULL)) {	char *path, *fullpath;	char *tmp, *tmp2;	fullpath = WMGetFilePanelFileName(opanel);	if (!fullpath)	    return;	path = wstrdup(fullpath);	tmp2 = strrchr(fullpath, '/');	if (tmp2)	    tmp2++;	tmp = wfindfileinarray(panel->pathList, tmp2);	if (tmp) {	    if (strcmp(fullpath, tmp)==0) {		free(path);		path = tmp2;	    }	    free(tmp);	}	if (!RGetImageFileFormat(fullpath)) {	    WMRunAlertPanel(scr, panel->win, _("Error"),			    _("The selected file does not contain a supported image."),			    _("OK"), NULL, NULL);	    free(path);	    free(fullpath);	} else {	    RImage *image, *scaled;	    WMPixmap *pixmap;	    WMSize size;	    image = RLoadImage(WMScreenRContext(scr), fullpath, 0);	    if (!image) {		char *message;		message = wstrappend(_("Could not load the selected file: "),				     (char*)RMessageForError(RErrorCode));		WMRunAlertPanel(scr, panel->win, _("Error"), message,				_("OK"), NULL, NULL);		free(message);		free(path);		free(fullpath);		return;	    }	    if (panel->image)		RDestroyImage(panel->image);	    panel->image = image;	    if (WMGetPopUpButtonSelectedItem(panel->typeP) == TYPE_PIXMAP) {		pixmap = WMCreatePixmapFromRImage(scr, image, 128);		size = WMGetPixmapSize(pixmap);		WMSetLabelImage(panel->imageL, pixmap);		WMResizeWidget(panel->imageL, size.width, size.height);		WMReleasePixmap(pixmap);	    } else {		updateTGradImage(panel);	    }	    panel->imageFile = path;	    WMSetTextFieldText(panel->imageT, path);	    free(fullpath);	}    }}