make capture session nullable

This commit is contained in:
tibbi 2018-06-12 10:18:25 +02:00
parent e568b96a0b
commit 049245e43d
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ ext {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:4.1.6' implementation 'com.simplemobiletools:commons:4.1.7'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

View File

@ -575,7 +575,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
} }
} }
mCaptureSession!!.apply { mCaptureSession?.apply {
stopRepeating() stopRepeating()
abortCaptures() abortCaptures()
capture(captureBuilder.build(), captureCallback, null) capture(captureBuilder.build(), captureCallback, null)