Fix for crash getting frame buffer

This commit is contained in:
Rene Zeldenthuis
2022-10-18 10:20:48 +02:00
parent 68497a6c2c
commit 348d513be0
3 changed files with 5 additions and 7 deletions

View File

@@ -149,10 +149,9 @@ void handle_snapshot()
return;
}
cam.run();
if (cam.getSize() == 0 || cam.getfb() == nullptr)
if (cam.getfb() == nullptr)
{
web_server.send(404, "text/plain", "Unable to obtain framebuffer");
web_server.send(404, "text/plain", "Unable to obtain frame buffer from the camera");
return;
}