From 2c79194e7de589a8d3629d48e19120b510684f63 Mon Sep 17 00:00:00 2001 From: Niclas Olmenius Date: Wed, 9 Mar 2022 19:07:51 +0100 Subject: [PATCH] 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 --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 01a7919b..685d255f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -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>* timeline = &ctx->threadData.begin()->second.timeline; if( timeline->empty() ) continue; for(;;)