summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-11-28 18:09:24 +0800
committerWu-cheng Li <wuchengli@google.com>2011-11-28 18:12:51 +0800
commit7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418 (patch)
treebfe8db62c9add5ff4c473c2aa86c9c2ebf5dec0a /src
parent749d056cd82ebfe6e613596d9e22dd355aeeec41 (diff)
downloadLegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.zip
LegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.tar.gz
LegacyCamera-7c881ad57ef6e4e1a2ced01eefedbc6d5ecc4418.tar.bz2
Fix NPE if the camera cannot be connected.
bug:5673972 Change-Id: I85587bd982e0af5dd7c3630958e105571d8e12d9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java2
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.