Sym must be valid.

This commit is contained in:
Bartosz Taudul 2024-09-28 23:35:39 +02:00
parent 20c4822c98
commit d0b6869e9e
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -295,16 +295,16 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct
auto namehash = charutil::hash( name ); auto namehash = charutil::hash( name );
if( namehash == 0 ) namehash++; if( namehash == 0 ) namehash++;
color = GetHsvColor( namehash, depth ); color = GetHsvColor( namehash, depth );
if( sym->isInline )
{
color = DarkenColorHalf( color );
}
} }
else else
{ {
name = "???"; name = "???";
color = 0xFF888888; color = 0xFF888888;
} }
if( sym->isInline )
{
color = DarkenColorHalf( color );
}
} }
const auto hiColor = HighlightColor( color ); const auto hiColor = HighlightColor( color );