mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Symbol might be unavailable.
This commit is contained in:
parent
6721db8600
commit
8740ea710a
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user