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

@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps
{
public BeatmapInfo BeatmapInfo;
public List<ControlPoint> ControlPoints;
public List<Color4> ComboColors = new List<Color4>
public readonly List<Color4> ComboColors = new List<Color4>
{
new Color4(17, 136, 170, 255),
new Color4(102, 136, 0, 255),

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);