diff --git a/WINGs/wpixmap.c b/WINGs/wpixmap.c index 272e56ac..5ad311cb 100644 --- a/WINGs/wpixmap.c +++ b/WINGs/wpixmap.c @@ -85,6 +85,9 @@ WMPixmap *WMCreatePixmapFromRImage(WMScreen * scrPtr, RImage * image, int thresh WMPixmap *pixPtr; Pixmap pixmap, mask; + if (image == NULL) + return NULL; + if (!RConvertImageMask(scrPtr->rcontext, image, &pixmap, &mask, threshold)) { return NULL; } diff --git a/wrlib/scale.c b/wrlib/scale.c index 0f5952c8..94612333 100644 --- a/wrlib/scale.c +++ b/wrlib/scale.c @@ -52,6 +52,9 @@ RImage *RScaleImage(RImage * image, unsigned new_width, unsigned new_height) unsigned char *d; RImage *img; + if (image == NULL) + return NULL; + if (new_width == image->width && new_height == image->height) return RCloneImage(image);