aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/tasks')
-rw-r--r--launcher/tasks/ConcurrentTask.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/tasks/ConcurrentTask.cpp b/launcher/tasks/ConcurrentTask.cpp
index ab7cbd03..2af296b9 100644
--- a/launcher/tasks/ConcurrentTask.cpp
+++ b/launcher/tasks/ConcurrentTask.cpp
@@ -37,7 +37,8 @@ void ConcurrentTask::executeTask()
{
m_total_size = m_queue.size();
- for (int i = 0; i < m_total_max_size; i++) {
+ int num_starts = std::min(m_total_max_size, m_total_size);
+ for (int i = 0; i < num_starts; i++) {
QMetaObject::invokeMethod(this, &ConcurrentTask::startNext, Qt::QueuedConnection);
}
}