mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-18 12:20:36 +01:00
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…
x
Reference in New Issue
Block a user