mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
one more null check
This commit is contained in:
@ -210,9 +210,10 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
|
||||
|
||||
private void setupPreview() {
|
||||
canTakePicture = true;
|
||||
if (camera != null) {
|
||||
if (camera != null && previewSize != null) {
|
||||
final Camera.Parameters parameters = camera.getParameters();
|
||||
parameters.setPreviewSize(previewSize.width, previewSize.height);
|
||||
|
||||
requestLayout();
|
||||
|
||||
camera.setParameters(parameters);
|
||||
|
Reference in New Issue
Block a user