diff options
author | jinwu <jinwu@codeaurora.org> | 2019-01-23 10:43:54 +0800 |
---|---|---|
committer | jinwu <jinwu@codeaurora.org> | 2019-01-23 10:47:52 +0800 |
commit | 8f2fd0858a49c0d2798f66a95fe8faa843d93ccc (patch) | |
tree | 750ba65a038ab01c87ea4cb91f9775c6ecde75cc | |
parent | c58907eeea2e015791f861cec1cdae291228997a (diff) | |
download | android_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-x | src/com/android/camera/CaptureModule.java | 2 |
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 "); } |