Correct error check when encoding AVIF images (#9442)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
This commit is contained in:
parent
3cd69cb12f
commit
02764a0077
@ -485,7 +485,7 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
|
||||
frame = image;
|
||||
} else {
|
||||
frame = avifImageCreateEmpty();
|
||||
if (image == NULL) {
|
||||
if (frame == NULL) {
|
||||
PyErr_SetString(PyExc_ValueError, "Image creation failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user