Merge pull request #7549 from radarhere/imagefont_memory

This commit is contained in:
Hugo van Kemenade 2023-11-13 16:14:18 +02:00 committed by GitHub
commit 93d5f8b45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -885,7 +885,9 @@ font_render(FontObject *self, PyObject *args) {
PyMem_Del(glyph_info);
return NULL;
}
id = PyLong_AsSsize_t(PyObject_GetAttrString(image, "id"));
PyObject *imageId = PyObject_GetAttrString(image, "id");
id = PyLong_AsSsize_t(imageId);
Py_XDECREF(imageId);
im = (Imaging)id;
x_offset -= stroke_width;