summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjinwu <jinwu@codeaurora.org>2019-01-23 10:43:54 +0800
committerjinwu <jinwu@codeaurora.org>2019-01-23 10:47:52 +0800
commit8f2fd0858a49c0d2798f66a95fe8faa843d93ccc (patch)
tree750ba65a038ab01c87ea4cb91f9775c6ecde75cc
parentc58907eeea2e015791f861cec1cdae291228997a (diff)
downloadandroid_packages_apps_Snap-8f2fd0858a49c0d2798f66a95fe8faa843d93ccc.tar.gz
android_packages_apps_Snap-8f2fd0858a49c0d2798f66a95fe8faa843d93ccc.tar.bz2
android_packages_apps_Snap-8f2fd0858a49c0d2798f66a95fe8faa843d93ccc.zip
Fix issue of that session isn't created
When launch snapcam and pause quickly, then session isn't created but still call abortCaptures will FC by NULL POINTER. Change-Id: If0f1facf5f1770648b18400454c8fd5e85bba559
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index f06521720..cbcd98970 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3033,7 +3033,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
Log.d(TAG, "Closing camera: " + mCameraDevice[i].getId());
- if (isAbortCapturesEnable()) {
+ if (isAbortCapturesEnable() && mCaptureSession[i] != null) {
mCaptureSession[i].abortCaptures();
Log.d(TAG, "Closing camera call abortCaptures ");
}