From 8740ea710a7c257279beed152797a88e22aa405a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Sep 2024 01:09:49 +0200 Subject: [PATCH] Symbol might be unavailable. --- profiler/src/profiler/TracyView_FlameGraph.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyView_FlameGraph.cpp b/profiler/src/profiler/TracyView_FlameGraph.cpp index b1b0475b..eb19d319 100644 --- a/profiler/src/profiler/TracyView_FlameGraph.cpp +++ b/profiler/src/profiler/TracyView_FlameGraph.cpp @@ -193,10 +193,18 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct else { auto sym = m_worker.GetSymbolData( (uint64_t)item.srcloc ); - name = m_worker.GetString( sym->name ); - auto namehash = charutil::hash( name ); - if( namehash == 0 ) namehash++; - color = GetHsvColor( namehash, depth ); + if( sym ) + { + name = m_worker.GetString( sym->name ); + auto namehash = charutil::hash( name ); + if( namehash == 0 ) namehash++; + color = GetHsvColor( namehash, depth ); + } + else + { + name = "???"; + color = 0xFF888888; + } } const auto hiColor = HighlightColor( color );