summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@cyanogenmoditalia.it>2016-12-11 20:35:55 +0100
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 22:00:46 +0200
commit6f29e7fd96f0b49424883b64e9c28ed9aeae26da (patch)
tree181e34a6301737202c0e2eefc943161302e7ad01
parentd17f129b9b72a30b5bcfe03d39901792e0e708c4 (diff)
downloadandroid_packages_apps_Snap-6f29e7fd96f0b49424883b64e9c28ed9aeae26da.zip
android_packages_apps_Snap-6f29e7fd96f0b49424883b64e9c28ed9aeae26da.tar.gz
android_packages_apps_Snap-6f29e7fd96f0b49424883b64e9c28ed9aeae26da.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();
}