rem: timage = RLoadImage(rc, path, 0);
add: if (path) timage = RLoadImage(rc, path, 0);
context: renderTexture(WMScreen *scr, proplist_t texture, int width, int height,	      char *path, int border){    char *type;    RImage *image;    Pixmap pixmap;    RContext *rc = WMScreenRContext(scr);    char *str;    RColor rcolor;    type = PLGetString(PLGetArrayElement(texture, 0));    image = RCreateImage(width, height, False);    if (strcasecmp(type, "solid")==0) {	str = PLGetString(PLGetArrayElement(texture, 1));	str2rcolor(rc, str, &rcolor);	RClearImage(image, &rcolor);    } else if (strcasecmp(&type[1], "gradient")==0) {	int style;	RColor rcolor2;	switch (toupper(type[0])) {	 case 'V':	    style = RVerticalGradient;	    break;	 case 'H':	    style = RHorizontalGradient;	    break;	 default:	 case 'D':	    style = RDiagonalGradient;	    break;	}	str = PLGetString(PLGetArrayElement(texture, 1));	str2rcolor(rc, str, &rcolor);	str = PLGetString(PLGetArrayElement(texture, 2));	str2rcolor(rc, str, &rcolor2);	image = RRenderGradient(width, height, &rcolor, &rcolor2, style);    } else if (strcasecmp(&type[2], "gradient")==0 && toupper(type[0])=='T') {	int style;	RColor rcolor2;	int i;	RImage *grad, *timage;	char *path;	switch (toupper(type[1])) {	 case 'V':	    style = RVerticalGradient;	    break;	 case 'H':	    style = RHorizontalGradient;	    break;	 default:	 case 'D':	    style = RDiagonalGradient;	    break;	}	str = PLGetString(PLGetArrayElement(texture, 3));	str2rcolor(rc, str, &rcolor);	str = PLGetString(PLGetArrayElement(texture, 4));	str2rcolor(rc, str, &rcolor2);	str = PLGetString(PLGetArrayElement(texture, 1));	path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);	timage = RLoadImage(rc, path, 0);	if (!timage) {	    wwarning("could not load file '%s': %s", path,		     RMessageForError(RErrorCode));	} else {		    grad = RRenderGradient(width, height, &rcolor, &rcolor2, style);	    image = RMakeTiledImage(timage, width, height);	    RDestroyImage(timage);	    i = atoi(PLGetString(PLGetArrayElement(texture, 2)));		    RCombineImagesWithOpaqueness(image, grad, i);	    RDestroyImage(grad);	}    } else if (strcasecmp(&type[2], "gradient")==0 && toupper(type[0])=='M') {	int style;	RColor **colors;	int i, j;	switch (toupper(type[1])) {	 case 'V':	    style = RVerticalGradient;	    break;	 case 'H':	    style = RHorizontalGradient;	    break;	 default:	 case 'D':	    style = RDiagonalGradient;	    break;	}	j = PLGetNumberOfElements(texture);		if (j > 0) {	    colors = wmalloc(j * sizeof(RColor*));	    for (i = 2; i < j; i++) {		str = PLGetString(PLGetArrayElement(texture, i));		colors[i-2] = wmalloc(sizeof(RColor));		str2rcolor(rc, str, colors[i-2]);	    }	    colors[i-2] = NULL;	    image = RRenderMultiGradient(width, height, colors, style);	    	    for (i = 0; colors[i]!=NULL; i++)		free(colors[i]);	    free(colors);	}    } else if (strcasecmp(&type[1], "pixmap")==0) {	RImage *timage;	char *path;	RColor color;	str = PLGetString(PLGetArrayElement(texture, 1));	path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);	timage = RLoadImage(rc, path, 0);	if (!timage) {	    wwarning("could not load file '%s': %s", path,		     RMessageForError(RErrorCode));	} else {	    str = PLGetString(PLGetArrayElement(texture, 2));	    str2rcolor(rc, str, &color);	    switch (toupper(type[0])) {	     case 'T':		image = RMakeTiledImage(timage, width, height);		RDestroyImage(timage);		timage = image;		break;	     case 'C':		image = RMakeCenteredImage(timage, width, height, &color);		RDestroyImage(timage);		timage = image;		break;	     case 'S':	     case 'M':		image = RScaleImage(timage, width, height);		RDestroyImage(timage);		timage = image;		break;	    }	}	free(path);    }    if (!image)	return None;    if (path) {	dumpRImage(path, image);    }        if (border < 0) {	if (border == RESIZEBAR_BEVEL) {	    drawResizebarBevel(image);	} else if (border == MENU_BEVEL) {	    drawMenuBevel(image);	}    } else if (border) {	RBevelImage(image, border);    }    RConvertImage(rc, image, &pixmap);    RDestroyImage(image);    return pixmap;}