more initialization

This commit is contained in:
wiredfool 2016-01-31 08:42:00 -08:00
parent a098c88509
commit c5bace00e3

View File

@ -585,13 +585,14 @@ _fill(PyObject* self, PyObject* args)
if (!im)
return NULL;
buffer[0] = buffer[1] = buffer[2] = buffer[3] = 0;
if (color) {
if (!getink(color, im, buffer)) {
ImagingDelete(im);
return NULL;
}
} else
buffer[0] = buffer[1] = buffer[2] = buffer[3] = 0;
}
(void) ImagingFill(im, buffer);
@ -1337,6 +1338,8 @@ _putdata(ImagingObject* self, PyObject* args)
INT32 inkint;
} u;
u.inkint = 0;
op = PySequence_Fast_GET_ITEM(seq, i);
if (!op || !getink(op, image, u.ink)) {
Py_DECREF(seq);