summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/PhotoUI.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index a7aebfb..970e2e5 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -165,7 +165,9 @@ public class PhotoUI implements PieListener,
Camera.Parameters parameters = ((PhotoModule)mController).getParameters();
if(parameters != null) {
Camera.Size size = parameters.getPreviewSize();
- setAspectRatio((float) size.width / size.height);
+ if (size != null) {
+ setAspectRatio((float) size.width / size.height);
+ }
}
}
};