1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 07:23:14 +08:00

Add null check when loading beatmap background.

This commit is contained in:
Dean Herbert 2017-02-12 15:59:57 +09:00
parent 1c3eca8813
commit 37e75e9a54
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps
{
if (background != null) return background;
if (BeatmapInfo.Metadata?.BackgroundFile == null) return null;
if (BeatmapInfo?.Metadata?.BackgroundFile == null) return null;
try
{

View File

@ -84,7 +84,7 @@ namespace osu.Game.Screens.Backgrounds
[BackgroundDependencyLoader]
private void load()
{
Sprite.Texture = beatmap.Background;
Sprite.Texture = beatmap?.Background;
}
}
}