Skip to content

Commit

Permalink
Fix crash when retrieval of system title image fails
Browse files Browse the repository at this point in the history
Closes #26194.
  • Loading branch information
bdach committed Dec 28, 2023
1 parent 68402bf commit 7a10e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Game/Screens/Menu/SystemTitle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ public SystemTitleImage(APISystemTitle systemTitle)
[BackgroundDependencyLoader]
private void load(LargeTextureStore textureStore)
{
var texture = textureStore.Get(SystemTitle.Image);
if (SystemTitle.Image.Contains(@"@2x"))
Texture? texture = textureStore.Get(SystemTitle.Image);
if (texture != null && SystemTitle.Image.Contains(@"@2x"))
texture.ScaleAdjust *= 2;

AutoSizeAxes = Axes.Both;
Expand Down

0 comments on commit 7a10e13

Please sign in to comment.