mirror of https://github.com/ppy/osu
Merge pull request #350 from peppy/general-fixes
Add null check when loading beatmap background.
This commit is contained in:
commit
dd80c3a1bc
|
@ -30,7 +30,7 @@ public Texture Background
|
|||
{
|
||||
if (background != null) return background;
|
||||
|
||||
if (BeatmapInfo.Metadata?.BackgroundFile == null) return null;
|
||||
if (BeatmapInfo?.Metadata?.BackgroundFile == null) return null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ public BeatmapBackground(WorkingBeatmap beatmap)
|
|||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Sprite.Texture = beatmap.Background;
|
||||
Sprite.Texture = beatmap?.Background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue