1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Fix possible nullref when there are 0 drumroll ticks

This commit is contained in:
smoogipoo 2018-03-05 21:19:04 +09:00
parent 7ce3e60722
commit df84b23847

View File

@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
if (timeOffset < 0)
return;
int countHit = NestedHitObjects.Count(o => o.IsHit);
int countHit = NestedHitObjects?.Count(o => o.IsHit) ?? 0;
if (countHit >= HitObject.RequiredGoodHits)
{
AddJudgement(new TaikoJudgement { Result = countHit >= HitObject.RequiredGreatHits ? HitResult.Great : HitResult.Good });