diff --git a/android/src/com/google/zxing/client/android/camera/CameraManager.java b/android/src/com/google/zxing/client/android/camera/CameraManager.java index d35d991d6..6a4113bdd 100755 --- a/android/src/com/google/zxing/client/android/camera/CameraManager.java +++ b/android/src/com/google/zxing/client/android/camera/CameraManager.java @@ -178,6 +178,10 @@ public final class CameraManager { return null; } Point screenResolution = configManager.getScreenResolution(); + if (screenResolution == null) { + // Called early, before init even finished + return null; + } int width = screenResolution.x * 3 / 4; if (width < MIN_FRAME_WIDTH) { width = MIN_FRAME_WIDTH;