summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@cyanogenmoditalia.it>2016-12-11 20:35:55 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-26 01:09:23 +0100
commit518a24e549fd845443ea1946afa8abdbd45f4870 (patch)
treed7114cebefd7781a987a9836dafa1c177139a6f2
parentcb1704cf036e12d972f1f9a2c37adb9113f85067 (diff)
downloadandroid_packages_apps_Snap-518a24e549fd845443ea1946afa8abdbd45f4870.zip
android_packages_apps_Snap-518a24e549fd845443ea1946afa8abdbd45f4870.tar.gz
android_packages_apps_Snap-518a24e549fd845443ea1946afa8abdbd45f4870.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 32011ce..110df5e 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -2408,6 +2408,9 @@ public class CameraActivity extends Activity
* @return whether controls are visible.
*/
private boolean arePreviewControlsVisible() {
+ if (mCurrentModule == null) {
+ return false;
+ }
return mCurrentModule.arePreviewControlsVisible();
}