From 7eeba29a8cdd19c71996cf78e4dfb1dd1889bfcd Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 5 May 2017 11:39:13 +0200 Subject: [PATCH] make parameters and camera nullable at autoflash --- app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt index c333967f..34148740 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt @@ -487,8 +487,8 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan Handler().postDelayed({ mActivity.runOnUiThread { - mParameters!!.flashMode = Camera.Parameters.FLASH_MODE_AUTO - mCamera!!.parameters = mParameters + mParameters?.flashMode = Camera.Parameters.FLASH_MODE_AUTO + mCamera?.parameters = mParameters } }, 1000) }