Fix context switch reconstruction condition.

This commit is contained in:
Bartosz Taudul 2021-11-06 20:49:15 +01:00
parent 69e5cf796d
commit 40cd5435df
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1901,7 +1901,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
m_threadBackground = std::thread( [this, eventMask] { m_threadBackground = std::thread( [this, eventMask] {
std::vector<std::thread> jobs; std::vector<std::thread> jobs;
if( !m_data.ctxSwitch.empty() ) if( !m_data.ctxSwitch.empty() && m_data.cpuDataCount != 0 )
{ {
jobs.emplace_back( std::thread( [this] { ReconstructContextSwitchUsage(); } ) ); jobs.emplace_back( std::thread( [this] { ReconstructContextSwitchUsage(); } ) );
} }