Fix possible nullref.

This commit is contained in:
smoogipooo
2017-03-16 13:49:16 +09:00
parent 2a2caeba32
commit 7764474cfe

View File

@ -73,7 +73,7 @@ namespace osu.Game.Modes
/// <summary> /// <summary>
/// All judgements held by this ScoreProcessor. /// All judgements held by this ScoreProcessor.
/// </summary> /// </summary>
protected List<TJudgement> Judgements; protected readonly List<TJudgement> Judgements = new List<TJudgement>();
/// <summary> /// <summary>
/// Whether the score is in a failable state. /// Whether the score is in a failable state.
@ -95,7 +95,7 @@ namespace osu.Game.Modes
protected ScoreProcessor(HitRenderer<TObject, TJudgement> hitRenderer) protected ScoreProcessor(HitRenderer<TObject, TJudgement> hitRenderer)
: this() : this()
{ {
Judgements = new List<TJudgement>(hitRenderer.Beatmap.HitObjects.Count); Judgements.Capacity = hitRenderer.Beatmap.HitObjects.Count;
hitRenderer.OnJudgement += addJudgement; hitRenderer.OnJudgement += addJudgement;
} }