Merge "Fix warning when force-disconnect but there is no connected API" into nyc-dev
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index 818fac6..e9d0654 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -1117,6 +1117,11 @@
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) {