Ignore uninitialized GPU contexts when rendering GPU events

This fixes an assertion crash when viewing GPU zones when no zones have been
recorded on a GPU context if the client is compiled with TRACY_ON_DEMAND
This commit is contained in:
Niclas Olmenius 2022-03-09 19:07:51 +01:00
parent f058ad01fc
commit 2c79194e7d

View File

@ -19245,7 +19245,7 @@ uint64_t View::GetZoneThread( const GpuEvent& zone ) const
{
for( const auto& ctx : m_worker.GetGpuData() )
{
assert( ctx->threadData.size() == 1 );
if ( ctx->threadData.size() != 1 ) continue;
const Vector<short_ptr<GpuEvent>>* timeline = &ctx->threadData.begin()->second.timeline;
if( timeline->empty() ) continue;
for(;;)