diff --git a/src/libImaging/Histo.c b/src/libImaging/Histo.c index 5ef72e6d3..923fa28d5 100644 --- a/src/libImaging/Histo.c +++ b/src/libImaging/Histo.c @@ -45,7 +45,7 @@ ImagingHistogramNew(Imaging im) /* Create histogram descriptor */ h = calloc(1, sizeof(struct ImagingHistogramInstance)); if (h == NULL) { - return NULL; + return (ImagingHistogram) ImagingError_MemoryError(); } strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1); h->mode[IMAGING_MODE_LENGTH-1] = 0;