From cabba52a89d7dab3ea58e8e509aaa40e40425e90 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 6 Mar 2023 08:51:18 +0200 Subject: [PATCH] Utils: Fix bad condition on iterator end Detected by Coverity. Amends c1b1842c486. Change-Id: Ie0233aab33317e286722dec7066d11dfc2a11a06 Reviewed-by: Jarek Kobus --- src/libs/utils/filestreamermanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/filestreamermanager.cpp b/src/libs/utils/filestreamermanager.cpp index 5a1ec9847ea..051f114578a 100644 --- a/src/libs/utils/filestreamermanager.cpp +++ b/src/libs/utils/filestreamermanager.cpp @@ -49,7 +49,7 @@ static void deleteStreamer(FileStreamHandle handle) { QMutexLocker locker(&s_mutex); auto it = s_fileStreamers.find(handle); - if (it != s_fileStreamers.end()) + if (it == s_fileStreamers.end()) return; if (QThread::currentThread() == it->second->thread()) { delete it->second;