summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-11-04 02:44:33 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-04 02:44:33 -0800
commit599aec0f4104481b7988760afebdb01b0d65f037 (patch)
tree52291978858eb383c33ddef36bb7cad028b23de0 /services/camera
parentfc4da68969ef979905ce29018a22460fe8c73dba (diff)
parentf72f7d57142cd3415bc189a8a9dee39674117167 (diff)
downloadframeworks_av-599aec0f4104481b7988760afebdb01b0d65f037.zip
frameworks_av-599aec0f4104481b7988760afebdb01b0d65f037.tar.gz
frameworks_av-599aec0f4104481b7988760afebdb01b0d65f037.tar.bz2
Merge "Camera: frameworks: Add NULL check for callback"
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 e4f792d..3d706c1 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -2032,7 +2032,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