From 1cbc9185fbb20d20d34f1e2d2ef8e67deae8a019 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 13 Mar 2023 17:44:44 +0100 Subject: [PATCH] screencast: Properly detect the fallback Do not check an it that is the container's end() --- src/plugins/screencast/screencaststream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index 888eaa6ec2..73d2cc7383 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -345,7 +345,7 @@ bool ScreenCastStream::createStream() // If the offered format is not available for dmabuf, prefer converting to another one than resorting to memfd if (itModifiers == supported.constEnd() && !supported.isEmpty()) { itModifiers = supported.constFind(DRM_FORMAT_ARGB8888); - if (itModifiers == supported.constEnd()) { + if (itModifiers != supported.constEnd()) { m_drmFormat = itModifiers.key(); } }