From 1967ce871a091e3d097e60e883529769a2804006 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 22 Oct 2017 17:09:33 +0200 Subject: [PATCH] Fix getting parent of not ended zone. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 19286c23..2e5450c0 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -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;