adding a null check

This commit is contained in:
tibbi 2019-07-06 15:27:20 +02:00
parent 6032b767c0
commit d631d109c3
1 changed files with 1 additions and 1 deletions

View File

@ -720,7 +720,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
mPreviewRequestBuilder!!.apply {
set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_START)
mCameraState = STATE_WAITING_LOCK
mCaptureSession!!.capture(build(), mCaptureCallback, mBackgroundHandler)
mCaptureSession?.capture(build(), mCaptureCallback, mBackgroundHandler)
}
} catch (e: CameraAccessException) {
mCameraState = STATE_PREVIEW