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

Commit 26bb2b1c authored by Chong Zhang's avatar Chong Zhang
Browse files

Fix warning when force-disconnect but there is no connected API

It's not really an error, we can return early.

bug: 27295820
Change-Id: I450ca615cf9c33b9aaef9c31eec8217c97516df5
parent 9c3e10b4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1117,6 +1117,11 @@ status_t BufferQueueProducer::disconnect(int api) {

        if (api == BufferQueueCore::CURRENTLY_CONNECTED_API) {
            api = mCore->mConnectedApi;
            // If we're asked to disconnect the currently connected api but
            // nobody is connected, it's not really an error.
            if (api == BufferQueueCore::NO_CONNECTED_API) {
                return NO_ERROR;
            }
        }

        switch (api) {