mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Add a default icon when a ruleset isn't present
This commit is contained in:
parent
df20845fbb
commit
e7931ef4c7
@ -35,7 +35,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
new ConstrainedIconContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = beatmap.Ruleset.CreateInstance().CreateIcon()
|
||||
// the null coalesce here is only present to make unit tests work (ruleset dlls aren't copied correctly for testing at the moment)
|
||||
Icon = beatmap.Ruleset?.CreateInstance().CreateIcon() ?? new SpriteIcon { Icon = FontAwesome.fa_question_circle_o }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user