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

Commit 3b471f24 authored by Randy Xu's avatar Randy Xu Committed by android-build-merger
Browse files

Solve the composer service NULL pointer crash am: 35b5114b

am: 851f74aa

Change-Id: I02a8651320b7c65706b59ed245888d1f17e5e41d
parents 37841495 851f74aa
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;