From 88a9a783ad4ab044376a760c359548afd5326c2d Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Tue, 19 Mar 2024 17:15:24 +0100 Subject: [PATCH] Add assert --- src/gui/scheduling/syncscheduler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/scheduling/syncscheduler.cpp b/src/gui/scheduling/syncscheduler.cpp index 9ebd8f7e4a4..b7388c221cc 100644 --- a/src/gui/scheduling/syncscheduler.cpp +++ b/src/gui/scheduling/syncscheduler.cpp @@ -66,7 +66,8 @@ class FolderPriorityQueue while (!_queue.empty() && !out) { // could be a nullptr by now out = _queue.top().folder; - _scheduledFolders.erase(_queue.top().rawFolder); + [[maybe_unused]] auto removed = _scheduledFolders.erase(_queue.top().rawFolder); + Q_ASSERT(removed = 1); _queue.pop(); } return out;