mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Don't use source location zones before they are ready.
This commit is contained in:
parent
70ae2f763d
commit
aac0a36a2d
@ -1251,7 +1251,7 @@ void View::DrawFrames()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int i = 0, idx = 0;
|
int i = 0, idx = 0;
|
||||||
if( m_findZone.show && !m_findZone.match.empty() )
|
if( m_worker.AreSourceLocationZonesReady() && m_findZone.show && !m_findZone.match.empty() )
|
||||||
{
|
{
|
||||||
auto& zoneData = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] );
|
auto& zoneData = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] );
|
||||||
auto begin = zoneData.zones.begin();
|
auto begin = zoneData.zones.begin();
|
||||||
|
@ -2035,6 +2035,7 @@ std::vector<int16_t> Worker::GetMatchingSourceLocation( const char* query, bool
|
|||||||
#ifndef TRACY_NO_STATISTICS
|
#ifndef TRACY_NO_STATISTICS
|
||||||
const Worker::SourceLocationZones& Worker::GetZonesForSourceLocation( int16_t srcloc ) const
|
const Worker::SourceLocationZones& Worker::GetZonesForSourceLocation( int16_t srcloc ) const
|
||||||
{
|
{
|
||||||
|
assert( AreSourceLocationZonesReady() );
|
||||||
static const SourceLocationZones empty;
|
static const SourceLocationZones empty;
|
||||||
auto it = m_data.sourceLocationZones.find( srcloc );
|
auto it = m_data.sourceLocationZones.find( srcloc );
|
||||||
return it != m_data.sourceLocationZones.end() ? it->second : empty;
|
return it != m_data.sourceLocationZones.end() ? it->second : empty;
|
||||||
|
Loading…
Reference in New Issue
Block a user