Symbol might be unavailable.

This commit is contained in:
Bartosz Taudul 2024-09-28 01:09:49 +02:00
parent 6721db8600
commit 8740ea710a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -193,10 +193,18 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct
else else
{ {
auto sym = m_worker.GetSymbolData( (uint64_t)item.srcloc ); auto sym = m_worker.GetSymbolData( (uint64_t)item.srcloc );
name = m_worker.GetString( sym->name ); if( sym )
auto namehash = charutil::hash( name ); {
if( namehash == 0 ) namehash++; name = m_worker.GetString( sym->name );
color = GetHsvColor( namehash, depth ); auto namehash = charutil::hash( name );
if( namehash == 0 ) namehash++;
color = GetHsvColor( namehash, depth );
}
else
{
name = "???";
color = 0xFF888888;
}
} }
const auto hiColor = HighlightColor( color ); const auto hiColor = HighlightColor( color );