mirror of
https://github.com/ppy/osu.git
synced 2025-02-06 02:23:21 +08:00
Add null check when loading beatmap background.
This commit is contained in:
parent
1c3eca8813
commit
37e75e9a54
@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
if (background != null) return background;
|
if (background != null) return background;
|
||||||
|
|
||||||
if (BeatmapInfo.Metadata?.BackgroundFile == null) return null;
|
if (BeatmapInfo?.Metadata?.BackgroundFile == null) return null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Sprite.Texture = beatmap.Background;
|
Sprite.Texture = beatmap?.Background;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user