mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:03:22 +08:00
Merge pull request #22192 from stanriders/fix-group-badges
Fix `GroupBadge` crashing on `null` group colour
This commit is contained in:
commit
b37c3203e5
@ -8,7 +8,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public class APIUserGroup
|
||||
{
|
||||
[JsonProperty(@"colour")]
|
||||
public string Colour { get; set; } = null!;
|
||||
public string? Colour { get; set; }
|
||||
|
||||
[JsonProperty(@"has_listing")]
|
||||
public bool HasListings { get; set; }
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = group.ShortName,
|
||||
Colour = Color4Extensions.FromHex(group.Colour),
|
||||
Colour = Color4Extensions.FromHex(group.Colour ?? Colour4.White.ToHex()),
|
||||
Shadow = false,
|
||||
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user