mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
modules/py_csi_ng: Fix NULL image arg.
omv_csi_snapshot() implementations generally expect image to not be NULL and crash if it is.
This commit is contained in:
parent
ea0505d52e
commit
b428655767
@ -248,7 +248,7 @@ static mp_obj_t py_csi_snapshot(size_t n_args, const mp_obj_t *pos_args, mp_map_
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int error = omv_csi_snapshot(self->csi, NULL, flags);
|
int error = omv_csi_snapshot(self->csi, &image, flags);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
omv_csi_raise_error(error);
|
omv_csi_raise_error(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user