make sure the camera is not null when setting up the preview after measuring
This commit is contained in:
parent
28bb406d42
commit
c1ea435343
|
@ -462,9 +462,11 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
|||
}
|
||||
|
||||
if (mSetupPreviewAfterMeasure) {
|
||||
mSetupPreviewAfterMeasure = false
|
||||
mCamera?.stopPreview()
|
||||
setupPreview()
|
||||
if (mCamera != null) {
|
||||
mSetupPreviewAfterMeasure = false
|
||||
mCamera!!.stopPreview()
|
||||
setupPreview()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue