Skip to content

Commit

Permalink
prevent initializing task manager without worker threads
Browse files Browse the repository at this point in the history
  • Loading branch information
vividos committed Dec 30, 2021
1 parent 6ea214f commit 1458e03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/winlame/TaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ TaskManager::TaskManager(const TaskManagerConfig& config)
uiNumThreads = m_config.m_uiUseNumTasks;
}

if (uiNumThreads == 0)
uiNumThreads = 2; // set to a sane value

// start up threads
for (unsigned int i = 0; i < uiNumThreads; i++)
{
Expand Down

0 comments on commit 1458e03

Please sign in to comment.