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

Commit 8050721d authored by Ruben Brunk's avatar Ruben Brunk
Browse files

camera2: Fix empty set handling for eviction.

Bug: 20304829
Change-Id: I120ed6e41ca592c3770797a5fb1e5ce556543949
parent 804a77d1
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -432,6 +432,7 @@ std::vector<std::shared_ptr<ClientDescriptor<KEY, VALUE>>> ClientManager<KEY, VA

    auto iter = evicted.cbegin();

    if (iter != evicted.cend()) {
        // Remove evicted clients from list
        mClients.erase(std::remove_if(mClients.begin(), mClients.end(),
            [&iter] (std::shared_ptr<ClientDescriptor<KEY, VALUE>>& curClientPtr) {
@@ -441,6 +442,7 @@ std::vector<std::shared_ptr<ClientDescriptor<KEY, VALUE>>> ClientManager<KEY, VA
                }
                return false;
            }), mClients.end());
    }

    mClients.push_back(client);
    mRemovedCondition.broadcast();