diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-11-28 18:09:24 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-11-28 18:12:51 +0800 |
commit | 7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418 (patch) | |
tree | bfe8db62c9add5ff4c473c2aa86c9c2ebf5dec0a | |
parent | 749d056cd82ebfe6e613596d9e22dd355aeeec41 (diff) | |
download | LegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.zip LegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.tar.gz LegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.tar.bz2 |
Fix NPE if the camera cannot be connected.
bug:5673972
Change-Id: I85587bd982e0af5dd7c3630958e105571d8e12d9
-rw-r--r-- | src/com/android/camera/Camera.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 90621c8..a391e20 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1578,7 +1578,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, stopPreview(); // Close the camera now because other activities may need to use it. closeCamera(); - mCameraSound.release(); + if (mCameraSound != null) mCameraSound.release(); resetScreenOn(); // Clear UI. |