mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
initialize unused pointer to prevent freeing without allocating
This commit is contained in:
parent
0141d15aad
commit
bd5935032f
|
@ -137,6 +137,7 @@ getfont(PyObject* self_, PyObject* args, PyObject* kw)
|
|||
}
|
||||
|
||||
if (filename && font_bytes_size <= 0) {
|
||||
self->font_bytes = NULL;
|
||||
error = FT_New_Face(library, filename, index, &self->face);
|
||||
} else {
|
||||
/* need to have allocated storage for font_bytes for the life of the object.*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user