mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Return ImagingError_MemoryError
This commit is contained in:
parent
fd4b0609ef
commit
15dd7aef9f
|
@ -54,7 +54,7 @@ ImagingHistogramNew(Imaging im)
|
|||
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
|
||||
if (h->histogram == NULL) {
|
||||
free(h);
|
||||
return NULL;
|
||||
return (ImagingHistogram) ImagingError_MemoryError();
|
||||
}
|
||||
|
||||
return h;
|
||||
|
|
Loading…
Reference in New Issue
Block a user