mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-16 19:30:40 +01:00
add a null check
This commit is contained in:
parent
baf6c36bcd
commit
7cf1b38578
@ -166,6 +166,9 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
}
|
||||
|
||||
private fun getSelectedResolution(): Camera.Size {
|
||||
if (mParameters == null)
|
||||
mParameters = mCamera!!.parameters
|
||||
|
||||
var index = getResolutionIndex()
|
||||
val resolutions = if (mIsVideoMode) {
|
||||
mParameters!!.supportedVideoSizes ?: mParameters!!.supportedPreviewSizes
|
||||
|
Loading…
x
Reference in New Issue
Block a user