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
15dd7aef9f
commit
fd14616dbb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user