Fix last time retrieval.

This commit is contained in:
Bartosz Taudul 2017-09-23 14:43:05 +02:00
parent 031818dff6
commit 7ffa987857

View File

@ -422,7 +422,14 @@ uint64_t View::GetLastTime() const
if( !v.timeline.empty() ) if( !v.timeline.empty() )
{ {
auto ev = v.timeline.back(); auto ev = v.timeline.back();
if( ev->end > (int64_t)last ) last = ev->end; if( ev->end == -1 )
{
if( ev->start > last ) last = ev->start;
}
else if( ev->end > last )
{
last = ev->end;
}
} }
} }
return last; return last;