mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Prevent crash when no locks to display.
This commit is contained in:
parent
02edbf54ff
commit
34030bf3d4
@ -1531,6 +1531,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
||||
if( lockmap.threads.find( tid ) == lockmap.threads.end() ) continue;
|
||||
auto& tl = lockmap.timeline;
|
||||
assert( !tl.empty() );
|
||||
if( tl.back()->time < m_zvStart ) continue;
|
||||
auto vbegin = std::lower_bound( tl.begin(), tl.end(), m_zvStart - m_delay, [] ( const auto& l, const auto& r ) { return l->time < r; } );
|
||||
const auto vend = std::lower_bound( tl.begin(), tl.end(), m_zvEnd + m_resolution, [] ( const auto& l, const auto& r ) { return l->time < r; } );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user