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

Commit e10dc92d authored by Zhijun He's avatar Zhijun He Committed by The Android Automerger
Browse files

camera3: Fix crash in set error state.

When camera open fails in camera3device initialize call, setErrorStateLockedV()
tries to access RequestThread object that is not created yet.

Bug: 9319518
Change-Id: Id5c6c0150ecaecb198045d5c6eb1b2ceebf5a727
parent 08419c3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1125,7 +1125,7 @@ void Camera3Device::setErrorStateLockedV(const char *fmt, va_list args) {
    ALOGE("Camera %d: %s", mId, errorCause.string());

    // But only do error state transition steps for the first error
    if (mStatus == STATUS_ERROR) return;
    if (mStatus == STATUS_ERROR || mStatus == STATUS_UNINITIALIZED) return;

    mErrorCause = errorCause;