Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e600894 authored by Ranjith Kagathi Ananda's avatar Ranjith Kagathi Ananda Committed by Zhijun He
Browse files

Camera: frameworks: Add NULL check for callback

--Added NULL check for mRemoteCallback

Ack by: Susmitha Gummalla

Bug: 25023187
Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
parent b3d9f563
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2084,7 +2084,11 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user)

void CameraService::Client::notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCode,
        const CaptureResultExtras& resultExtras) {
    if (mRemoteCallback != NULL) {
        mRemoteCallback->notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_RELEASED, 0);
    } else {
        ALOGE("mRemoteCallback is NULL!!");
    }
}

// NOTE: function is idempotent