From d1e706d75641b6900a632801f58e6db8400be9d5 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sat, 19 Dec 2020 19:42:29 -0800 Subject: [PATCH] return ImagingError_MemoryError --- src/_imaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_imaging.c b/src/_imaging.c index 53a03fc88..ca4c017d5 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -3182,7 +3182,7 @@ _draw_polygon(ImagingDrawObject* self, PyObject* args) ixy = (int*) calloc(n, 2 * sizeof(int)); if (ixy == NULL) { free(xy); - return NULL; + return ImagingError_MemoryError(); } for (i = 0; i < n; i++) {