1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Fix possible nullrefs.

This commit is contained in:
smoogipooo 2017-05-11 14:50:18 +09:00
parent 2d2d1beddd
commit a762f820c6

View File

@ -199,7 +199,7 @@ namespace osu.Game.Rulesets.UI
protected override Container<Drawable> Content => content;
private readonly Container content;
private List<DrawableHitObject<TObject, TJudgement>> drawableObjects;
private readonly List<DrawableHitObject<TObject, TJudgement>> drawableObjects = new List<DrawableHitObject<TObject, TJudgement>>();
protected HitRenderer(WorkingBeatmap beatmap)
: base(beatmap)
@ -226,7 +226,7 @@ namespace osu.Game.Rulesets.UI
private void loadObjects()
{
drawableObjects = new List<DrawableHitObject<TObject, TJudgement>>(Beatmap.HitObjects.Count);
drawableObjects.Capacity = Beatmap.HitObjects.Count;
foreach (TObject h in Beatmap.HitObjects)
{