mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-25 04:28:46 +02: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) {
|
if (mSetupPreviewAfterMeasure) {
|
||||||
mSetupPreviewAfterMeasure = false
|
if (mCamera != null) {
|
||||||
mCamera?.stopPreview()
|
mSetupPreviewAfterMeasure = false
|
||||||
setupPreview()
|
mCamera!!.stopPreview()
|
||||||
|
setupPreview()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user