Fixed a Python 3 specific crash.

This commit is contained in:
Alastair Houghton 2014-03-25 16:58:44 +00:00
parent fea6811af0
commit 831216f609

View File

@ -327,7 +327,7 @@ j2k_encode_entry(Imaging im, ImagingCodecState state,
tile_height = im->ysize;
}
if (PySequence_Check(context->quality_layers)) {
if (context->quality_layers && PySequence_Check(context->quality_layers)) {
Py_ssize_t len = PySequence_Length(context->quality_layers);
Py_ssize_t n;
float *pq;