summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-30 13:22:15 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-30 13:22:15 -0700
commitb1a975234112cb98ddd5a3ff5f991007eecaff2e (patch)
treeae54ee8724f7c0ce947976f0ea509eebaa29ae24
parentb7d7d5f6380e1b7c2b1754be05b0113b91ce01c9 (diff)
parentd0cbb1a52d1b2b8b04a122501d696938b295e502 (diff)
downloadframeworks_base-b1a975234112cb98ddd5a3ff5f991007eecaff2e.zip
frameworks_base-b1a975234112cb98ddd5a3ff5f991007eecaff2e.tar.gz
frameworks_base-b1a975234112cb98ddd5a3ff5f991007eecaff2e.tar.bz2
Merge change 5739 into donut
* changes: Check to make sure the Java camera object is still valid on the callback from native. Omitted from previous fix. Bug 1936850.
-rw-r--r--core/jni/android_hardware_Camera.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 3550716..3dcc09f 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -171,6 +171,10 @@ void JNICameraContext::postData(int32_t msgType, const sp<IMemory>& dataPtr)
// VM pointer will be NULL if object is released
Mutex::Autolock _l(mLock);
JNIEnv *env = AndroidRuntime::getJNIEnv();
+ if (mCameraJObjectWeak == NULL) {
+ LOGW("callback on dead camera object");
+ return;
+ }
// return data based on callback type
switch(msgType) {