summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentreducekernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentreducekernel.h')
-rw-r--r--src/concurrent/qtconcurrentreducekernel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h
index cb7d7910aa..c337a9192f 100644
--- a/src/concurrent/qtconcurrentreducekernel.h
+++ b/src/concurrent/qtconcurrentreducekernel.h
@@ -117,7 +117,7 @@ class ReduceKernel
public:
ReduceKernel(QThreadPool *pool, ReduceOptions _reduceOptions)
: reduceOptions(_reduceOptions), progress(0), resultsMapSize(0),
- threadCount(pool->maxThreadCount())
+ threadCount(std::max(pool->maxThreadCount(), 1))
{ }
void runReduce(ReduceFunctor &reduce,