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

Commit b78ff5fb authored by Andreas Huber's avatar Andreas Huber
Browse files

Fix assertion triggered when mediaserver dies at roughly the same

time that a client attempts to explicitly free an OMX node.

Change-Id: I767e6af402801357da20b328611cc7cddeed0260
related-to-bug: 6012750
parent 27431de0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -253,7 +253,11 @@ status_t OMX::freeNode(node_id node) {
    OMXNodeInstance *instance = findInstance(node);

    ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
    CHECK(index >= 0);
    if (index < 0) {
        // This could conceivably happen if the observer dies at roughly the
        // same time that a client attempts to free the node explicitly.
        return OK;
    }
    mLiveNodes.removeItemsAt(index);

    instance->observer()->asBinder()->unlinkToDeath(this);