diff options
author | Angus Kong <shkong@google.com> | 2011-10-20 18:15:29 +0800 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2011-10-20 18:15:29 +0800 |
commit | 43083162b9ac8faf83a393cccaaf661d45ae2a8e (patch) | |
tree | 777e9b99071124516437badad0ea808678d7b464 /src/com | |
parent | e0b66a87432f452bf4a10ef5e0d835113a8ab69d (diff) | |
download | LegacyCamera-43083162b9ac8faf83a393cccaaf661d45ae2a8e.zip LegacyCamera-43083162b9ac8faf83a393cccaaf661d45ae2a8e.tar.gz LegacyCamera-43083162b9ac8faf83a393cccaaf661d45ae2a8e.tar.bz2 |
Fix camera app crash when failed open the camera.
bug:5488657
Change-Id: If22aca555b3f83ea754a67018feea69d6e97031b
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/Camera.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 589a5c8..2c1662b 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1503,8 +1503,10 @@ public class Camera extends ActivityBase implements FocusManager.Listener, if (mFirstTimeInitialized) { mOrientationListener.disable(); - mImageSaver.finish(); - mImageSaver = null; + if (mImageSaver != null) { + mImageSaver.finish(); + mImageSaver = null; + } if (!mIsImageCaptureIntent && mThumbnail != null && !mThumbnail.fromFile()) { mThumbnail.saveTo(new File(getFilesDir(), Thumbnail.LAST_THUMB_FILENAME)); } |