summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@cyanogenmoditalia.it>2016-12-11 20:35:55 +0100
committerMichael Bestas <mikeioannina@gmail.com>2016-12-23 00:37:45 -0800
commitd58b217be5bbdd5c8e29ca3d71fb168b65df7dac (patch)
treeabf41262c2c22496bce50f923bb46b16a42bcb30
parentc2427aa7d2ef76dc4dd586a3328cd1f13a3f43cd (diff)
downloadandroid_packages_apps_Snap-d58b217be5bbdd5c8e29ca3d71fb168b65df7dac.zip
android_packages_apps_Snap-d58b217be5bbdd5c8e29ca3d71fb168b65df7dac.tar.gz
android_packages_apps_Snap-d58b217be5bbdd5c8e29ca3d71fb168b65df7dac.tar.bz2
Snap: prevent NPE when checking if controls are visible
Change-Id: Id054ccc9445722bcb08953fd40e43a82bdd13ae2 Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
-rw-r--r--src/com/android/camera/CameraActivity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 4f5d923..250e49e 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -2372,6 +2372,9 @@ public class CameraActivity extends Activity
* @return whether controls are visible.
*/
private boolean arePreviewControlsVisible() {
+ if (mCurrentModule == null) {
+ return false;
+ }
return mCurrentModule.arePreviewControlsVisible();
}