diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java b/cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java index 90684e5a..39cbf63e 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java @@ -160,6 +160,9 @@ public class Camera1Engine extends CameraBaseEngine implements } private boolean previewAspectRatioEqualsForModes() { + if (mCaptureSize == null) { + return false; + } Size prevModeSize = mCaptureSize; mCaptureSize = computeCaptureSize();