diff --git a/app/src/main/java/com/simplemobiletools/flashlight/MyCameraImpl.java b/app/src/main/java/com/simplemobiletools/flashlight/MyCameraImpl.java index cd18f64..276798a 100644 --- a/app/src/main/java/com/simplemobiletools/flashlight/MyCameraImpl.java +++ b/app/src/main/java/com/simplemobiletools/flashlight/MyCameraImpl.java @@ -221,8 +221,10 @@ public class MyCameraImpl { if (mCamera != null) { mCamera.setParameters(torchOff); - mCamera.release(); - mCamera = null; + if (!mShouldEnableFlashlight) { + mCamera.release(); + mCamera = null; + } } mIsStroboscopeRunning = false; mShouldStroboscopeStop = false;