aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-05-24 20:19:31 -0300
committerflow <flowlnlnln@gmail.com>2022-05-24 20:27:25 -0300
commitf8e7fb3d481d41473a6d7102d5c218e4a18bba3d (patch)
tree5db48bd247586b44e7f4a6c11e1283c78075b242 /launcher/tasks
parent166f8727121399f7604d25580ced39472e9a3034 (diff)
downloadPrismLauncher-f8e7fb3d481d41473a6d7102d5c218e4a18bba3d.tar.gz
PrismLauncher-f8e7fb3d481d41473a6d7102d5c218e4a18bba3d.tar.bz2
PrismLauncher-f8e7fb3d481d41473a6d7102d5c218e4a18bba3d.zip
fix: better handle corner case
Diffstat (limited to 'launcher/tasks')
-rw-r--r--launcher/tasks/SequentialTask.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}