adding a null check
This commit is contained in:
parent
6032b767c0
commit
d631d109c3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue