fix for uninitialized thread pool

This commit is contained in:
Anton Popov 2020-12-22 21:29:47 +03:00
parent 57a1642035
commit eecd51bb75

View File

@ -1434,7 +1434,7 @@ BlocksList Aggregator::prepareBlocksAndFillTwoLevelImpl(
bool final,
ThreadPool * thread_pool) const
{
size_t max_threads = thread_pool->getMaxThreads();
size_t max_threads = thread_pool ? thread_pool->getMaxThreads() : 1;
if (max_threads > data_variants.aggregates_pools.size())
for (size_t i = data_variants.aggregates_pools.size(); i < max_threads; ++i)
data_variants.aggregates_pools.push_back(std::make_shared<Arena>());