imlib: Fix bug with copy argument updating original object.

This commit is contained in:
Kwabena W. Agyeman 2023-04-01 17:34:24 -07:00
parent bb8da452a3
commit 0e2e95f059

View File

@ -1001,6 +1001,9 @@ static mp_obj_t py_image_to(pixformat_t pixfmt, const uint16_t *default_color_pa
if (copy_obj) {
if (mp_obj_is_integer(copy_obj)) {
copy = mp_obj_get_int(copy_obj);
if (copy) {
arg_other = NULL;
}
} else {
arg_other = py_image_cobj(copy_obj);
}