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

Commit b4a3c6dd authored by Ranjith Kagathi Ananda's avatar Ranjith Kagathi Ananda Committed by android-build-merger
Browse files

Camera: frameworks: Add NULL check for callback

am: 3e600894

* commit '3e600894':
  Camera: frameworks: Add NULL check for callback
parents c275e2d7 3e600894
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