mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-11 16:43:10 +03:00
Return ImagingError_MemoryError
This commit is contained in:
parent
15dd7aef9f
commit
fd14616dbb
|
@ -45,7 +45,7 @@ ImagingHistogramNew(Imaging im)
|
||||||
/* Create histogram descriptor */
|
/* Create histogram descriptor */
|
||||||
h = calloc(1, sizeof(struct ImagingHistogramInstance));
|
h = calloc(1, sizeof(struct ImagingHistogramInstance));
|
||||||
if (h == NULL) {
|
if (h == NULL) {
|
||||||
return NULL;
|
return (ImagingHistogram) ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1);
|
strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1);
|
||||||
h->mode[IMAGING_MODE_LENGTH-1] = 0;
|
h->mode[IMAGING_MODE_LENGTH-1] = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user