summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorRanjith Kagathi Ananda <ranjith@codeaurora.org>2015-10-08 16:00:33 -0700
committerZhijun He <zhijunhe@google.com>2015-10-16 17:08:14 -0700
commit3e600894685b994849d59307721c6862ae0c45b7 (patch)
tree1d2636ae0bdbda0b35dc8b3cd176607f3f58a361 /services/camera
parentb3d9f56313f1838649712297ebc8205c4ec14870 (diff)
downloadframeworks_av-3e600894685b994849d59307721c6862ae0c45b7.zip
frameworks_av-3e600894685b994849d59307721c6862ae0c45b7.tar.gz
frameworks_av-3e600894685b994849d59307721c6862ae0c45b7.tar.bz2
Camera: frameworks: Add NULL check for callback
--Added NULL check for mRemoteCallback Ack by: Susmitha Gummalla Bug: 25023187 Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/CameraService.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index f2d6ad6..2bb282f 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -2084,7 +2084,11 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user)
void CameraService::Client::notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCode,
const CaptureResultExtras& resultExtras) {
- mRemoteCallback->notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_RELEASED, 0);
+ if (mRemoteCallback != NULL) {
+ mRemoteCallback->notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_RELEASED, 0);
+ } else {
+ ALOGE("mRemoteCallback is NULL!!");
+ }
}
// NOTE: function is idempotent