Merge pull request #350 from peppy/general-fixes

Add null check when loading beatmap background.
This commit is contained in:
Dean Herbert 2017-02-12 16:27:53 +09:00 committed by GitHub
commit dd80c3a1bc
2 changed files with 2 additions and 2 deletions

View File

@ -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
{

View File

@ -84,7 +84,7 @@ public BeatmapBackground(WorkingBeatmap beatmap)
[BackgroundDependencyLoader]
private void load()
{
Sprite.Texture = beatmap.Background;
Sprite.Texture = beatmap?.Background;
}
}
}