summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentiteratekernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentiteratekernel.cpp')
-rw-r--r--src/concurrent/qtconcurrentiteratekernel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/concurrent/qtconcurrentiteratekernel.cpp b/src/concurrent/qtconcurrentiteratekernel.cpp
index 088c8384ce..00228f181c 100644
--- a/src/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/concurrent/qtconcurrentiteratekernel.cpp
@@ -67,7 +67,7 @@ namespace QtConcurrent {
*/
BlockSizeManager::BlockSizeManager(QThreadPool *pool, int iterationCount)
- : maxBlockSize(iterationCount / (pool->maxThreadCount() * 2)),
+ : maxBlockSize(iterationCount / (std::max(pool->maxThreadCount(), 1) * 2)),
beforeUser(0), afterUser(0),
m_blockSize(1)
{ }