Fix lockup in context switch processing.

This commit is contained in:
Bartosz Taudul 2023-03-25 00:45:13 +01:00
parent 1e63406ac7
commit 8908b68557
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -507,7 +507,7 @@ void TimelineItemThread::PreprocessContextSwitches( const TimelineContext& ctx,
auto next = it + 1;
for(;;)
{
next = std::lower_bound( next, citend, nextTime, [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } );
next = std::lower_bound( next, citend, nextTime, [this] ( const auto& l, const auto& r ) { return ( l.IsEndValid() ? l.End() : m_worker.GetLastTime() ) < r; } );
if( next == citend ) break;
auto prev = next - 1;
const auto pt = prev->IsEndValid() ? prev->End() : m_worker.GetLastTime();