mirror of
				https://github.com/SimpleMobileTools/Simple-Camera.git
				synced 2025-06-27 09:02:59 +02:00 
			
		
		
		
	make sure the camera is not null when setting up the preview after measuring
This commit is contained in:
		| @@ -462,12 +462,14 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan | ||||
|             } | ||||
|  | ||||
|             if (mSetupPreviewAfterMeasure) { | ||||
|                 if (mCamera != null) { | ||||
|                     mSetupPreviewAfterMeasure = false | ||||
|                 mCamera?.stopPreview() | ||||
|                     mCamera!!.stopPreview() | ||||
|                     setupPreview() | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     fun enableFlash() { | ||||
|         mParameters!!.flashMode = Camera.Parameters.FLASH_MODE_TORCH | ||||
|   | ||||
		Reference in New Issue
	
	Block a user