mirror of https://github.com/ppy/osu
Add back null check
This commit is contained in:
parent
c03e47317a
commit
8e0049c005
|
@ -77,7 +77,7 @@ private static List<MonoEncoding> encodeMono(List<DifficultyHitObject> data)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue