Skip to content

Commit

Permalink
Check camera is running on get_frame().
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed Jan 16, 2024
1 parent 2e1d747 commit 44cfd96
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ camera_get_frame(struct Camera* self,
struct ImageInfo* info)
{
CHECK(self);
CHECK(self->state == DeviceState_Running);
enum DeviceStatusCode ecode = self->get_frame(self, im, nbytes, info);
if (ecode != Device_Ok) {
camera_stop(self);
Expand Down

0 comments on commit 44cfd96

Please sign in to comment.