summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-12-01 19:31:03 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-12-01 19:31:03 -0800
commit314ba18d434bcea2181158bc4b6d2cc223c6a734 (patch)
tree3562df606babd687cd5b0c6f29da90c7c950ad20
parent8af8b215516fdf01a04b2f4a74c879fd8daf0e78 (diff)
parentb3babe73ce51b3842617d1690624b4d821bb30bb (diff)
downloadLegacyCamera-314ba18d434bcea2181158bc4b6d2cc223c6a734.zip
LegacyCamera-314ba18d434bcea2181158bc4b6d2cc223c6a734.tar.gz
LegacyCamera-314ba18d434bcea2181158bc4b6d2cc223c6a734.tar.bz2
am b3babe73: Merge "Fix NPE in releaseMediaRecorder. do not merge" into gingerbread
* commit 'b3babe73ce51b3842617d1690624b4d821bb30bb': Fix NPE in releaseMediaRecorder. do not merge
-rw-r--r--src/com/android/camera/VideoCamera.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 48ffea6..ee05f9e 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -1037,8 +1037,9 @@ public class VideoCamera extends NoSearchActivity
mMediaRecorder.release();
mMediaRecorder = null;
}
- // Take back the camera object control from media recorder.
- mCameraDevice.lock();
+ // Take back the camera object control from media recorder. Camera
+ // device may be null if the activity is paused.
+ if (mCameraDevice != null) mCameraDevice.lock();
}
private void createVideoPath() {