Make sure context switch end time wasn't set already.

This commit is contained in:
Bartosz Taudul 2019-10-15 14:54:28 +02:00
parent a20c6604c3
commit bdb8516d04

View File

@ -4371,6 +4371,7 @@ void Worker::ProcessContextSwitch( const QueueContextSwitch& ev )
assert( !data.empty() );
auto& item = data.back();
assert( item.Start() <= time );
assert( item.End() == -1 );
item.SetEnd( time );
item.SetReason( ev.reason );
item.SetState( ev.state );