summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentrunbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentrunbase.h')
-rw-r--r--src/concurrent/qtconcurrentrunbase.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/concurrent/qtconcurrentrunbase.h b/src/concurrent/qtconcurrentrunbase.h
index aaa1245856..632689e9e0 100644
--- a/src/concurrent/qtconcurrentrunbase.h
+++ b/src/concurrent/qtconcurrentrunbase.h
@@ -84,7 +84,13 @@ public:
this->setRunnable(this);
this->reportStarted();
QFuture<T> theFuture = this->future();
- pool->start(this, /*m_priority*/ 0);
+ if (pool) {
+ pool->start(this, /*m_priority*/ 0);
+ } else {
+ this->reportCanceled();
+ this->reportFinished();
+ delete this;
+ }
return theFuture;
}