mirror of
https://github.com/FossifyOrg/Camera.git
synced 2026-06-11 17:47:40 -04:00
make sure the camera is not null when setting up the preview after measuring
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user