Do not stop camera if unnecessary

This commit is contained in:
Florin9doi committed 2020-01-26 10:04:12 +02:00
1 parent 2b57d2365f
commit 63196897e4
1 file changed
+3 -1
+3 -1
View File
@@ -64,7 +64,9 @@ void __UsbCamDoState(PointerWrap &p) {
}
void __UsbCamShutdown() {
Camera::stopCapture();
if (config->mode == Camera::Mode::Video) { // stillImage? TBD
Camera::stopCapture();
}
delete[] videoBuffer;
videoBuffer = nullptr;
delete[] config;