Added nullability check

pull/806/head
alexander.melnikov 5 years ago
parent 3b28133623
commit ca6c81edaf
  1. 3
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java

@ -160,6 +160,9 @@ public class Camera1Engine extends CameraBaseEngine implements
} }
private boolean previewAspectRatioEqualsForModes() { private boolean previewAspectRatioEqualsForModes() {
if (mCaptureSize == null) {
return false;
}
Size prevModeSize = mCaptureSize; Size prevModeSize = mCaptureSize;
mCaptureSize = computeCaptureSize(); mCaptureSize = computeCaptureSize();

Loading…
Cancel
Save