Update null background handling

This commit is contained in:
Drew DeVault
2017-01-30 09:44:02 -05:00
parent 66d104394f
commit 0a81fdbd10
2 changed files with 9 additions and 11 deletions

View File

@ -298,18 +298,15 @@ namespace osu.Game.Screens.Select
private void changeBackground(WorkingBeatmap beatmap)
{
if (beatmap == null)
return;
var backgroundModeBeatmap = Background as BackgroundModeBeatmap;
if (backgroundModeBeatmap != null)
{
backgroundModeBeatmap.Beatmap = beatmap;
// TODO: Remove this once we have non-nullable Beatmap
(Background as BackgroundModeBeatmap)?.BlurTo(BACKGROUND_BLUR, 1000);
backgroundModeBeatmap.BlurTo(BACKGROUND_BLUR, 1000);
}
beatmapInfoWedge.UpdateBeatmap(beatmap);
if (beatmap != null)
beatmapInfoWedge.UpdateBeatmap(beatmap);
}
/// <summary>