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

Commit 851f74aa authored by Randy Xu's avatar Randy Xu Committed by android-build-merger
Browse files

Solve the composer service NULL pointer crash

am: 35b5114b

Change-Id: I87a02aabe699db010c2eaba4178c9dff77e38f5a
parents f3b4c292 35b5114b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -426,7 +426,13 @@ Error HWC2On1Adapter::registerCallback(Callback descriptor,

    std::unique_lock<std::recursive_timed_mutex> lock(mStateMutex);

    if (pointer != nullptr) {
        mCallbacks[descriptor] = {callbackData, pointer};
    } else {
        ALOGI("unregisterCallback(%s)", to_string(descriptor).c_str());
        mCallbacks.erase(descriptor);
        return Error::None;
    }

    bool hasPendingInvalidate = false;
    std::vector<hwc2_display_t> displayIds;