Attempt to fix nullref warning.

This commit is contained in:
smoogipooo
2017-03-14 17:14:11 +09:00
parent 2b3b3b7255
commit d6ccc66b23
4 changed files with 4 additions and 5 deletions

View File

@ -11,6 +11,7 @@ using osu.Game.Modes.Objects.Drawables;
using osu.Game.Screens.Play;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace osu.Game.Modes.UI
@ -52,6 +53,8 @@ namespace osu.Game.Modes.UI
protected HitRenderer(WorkingBeatmap beatmap)
{
Debug.Assert(beatmap != null, "HitRenderer initialized with a null beatmap.");
// Convert + process the beatmap
Beatmap = CreateBeatmapConverter().Convert(beatmap.Beatmap);
Beatmap.HitObjects.ForEach(CreateBeatmapProcessor().SetDefaults);