From f8e7fb3d481d41473a6d7102d5c218e4a18bba3d Mon Sep 17 00:00:00 2001 From: flow Date: Tue, 24 May 2022 20:19:31 -0300 Subject: [PATCH] fix: better handle corner case --- launcher/tasks/SequentialTask.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/launcher/tasks/SequentialTask.cpp b/launcher/tasks/SequentialTask.cpp index e7d58524..ee57cac1 100644 --- a/launcher/tasks/SequentialTask.cpp +++ b/launcher/tasks/SequentialTask.cpp @@ -34,6 +34,11 @@ void SequentialTask::executeTask() bool SequentialTask::abort() { if(m_currentIndex == -1 || m_currentIndex >= m_queue.size()) { + if(m_currentIndex == -1) { + // Don't call emitAborted() here, we want to bypass the 'is the task running' check + emit aborted(); + emit finished(); + } m_queue.clear(); return true; }