1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 01:40:03 +08:00

Add back null check

This commit is contained in:
Dan Balasescu
2022-08-15 21:57:35 +09:00
Unverified
parent c03e47317a
commit 8e0049c005
@@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
TaikoDifficultyHitObject? previousObject = taikoObject.PreviousNote(0);
// If this is the first object in the list or the colour changed, create a new mono encoding
if (currentEncoding == null || (taikoObject.BaseObject as Hit)?.Type != (previousObject?.BaseObject as Hit)?.Type)
if (currentEncoding == null || previousObject == null || (taikoObject.BaseObject as Hit)?.Type != (previousObject.BaseObject as Hit)?.Type)
{
currentEncoding = new MonoEncoding();
encodings.Add(currentEncoding);