mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix getting parent of not ended zone.
This commit is contained in:
parent
a4f2eccbe1
commit
1967ce871a
@ -2959,7 +2959,7 @@ const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const
|
||||
{
|
||||
auto it = std::upper_bound( timeline->begin(), timeline->end(), zone.start, [] ( const auto& l, const auto& r ) { return l < r->start; } );
|
||||
if( it != timeline->begin() ) --it;
|
||||
if( (*it)->start > zone.end ) break;
|
||||
if( zone.end != -1 && (*it)->start > zone.end ) break;
|
||||
if( *it == &zone ) return parent;
|
||||
if( (*it)->child.empty() ) break;
|
||||
parent = *it;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user