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

Commit 1812b4e7 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Android (Google) Code Review
Browse files

Merge "camera2 ndk: Add some null checks before dereferencing captureSequenceId."

parents b3527ddc bc2a37f4
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -105,7 +105,9 @@ camera_status_t ACameraCaptureSession_logicalCamera_capture(

    if (session->isClosed()) {
        ALOGE("%s: session %p is already closed", __FUNCTION__, session);
        if (captureSequenceId) {
            *captureSequenceId = CAPTURE_SEQUENCE_ID_NONE;
        }
        return ACAMERA_ERROR_SESSION_CLOSED;
    }

@@ -127,7 +129,9 @@ camera_status_t ACameraCaptureSession_setRepeatingRequest(

    if (session->isClosed()) {
        ALOGE("%s: session %p is already closed", __FUNCTION__, session);
        if (captureSequenceId) {
            *captureSequenceId = CAPTURE_SEQUENCE_ID_NONE;
        }
        return ACAMERA_ERROR_SESSION_CLOSED;
    }

@@ -149,7 +153,9 @@ camera_status_t ACameraCaptureSession_logicalCamera_setRepeatingRequest(

    if (session->isClosed()) {
        ALOGE("%s: session %p is already closed", __FUNCTION__, session);
        if (captureSequenceId) {
            *captureSequenceId = CAPTURE_SEQUENCE_ID_NONE;
        }
        return ACAMERA_ERROR_SESSION_CLOSED;
    }