mirror of
https://github.com/ppy/osu.git
synced 2026-05-26 00:50:16 +08:00
Fix possible nullref exceptions
This commit is contained in:
@@ -130,7 +130,8 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
});
|
||||
}
|
||||
|
||||
ticks.ForEach(t => t.ApplyDefaults(controlPointInfo, difficulty));
|
||||
if (controlPointInfo != null && difficulty != null)
|
||||
ticks.ForEach(t => t.ApplyDefaults(controlPointInfo, difficulty));
|
||||
|
||||
return ticks;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,8 @@ namespace osu.Game.Rulesets.Mania.Objects
|
||||
Column = Column
|
||||
};
|
||||
|
||||
tick.ApplyDefaults(controlPointInfo, difficulty);
|
||||
if (controlPointInfo != null && difficulty != null)
|
||||
tick.ApplyDefaults(controlPointInfo, difficulty);
|
||||
|
||||
ret.Add(tick);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,8 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
}))
|
||||
};
|
||||
|
||||
ret.ApplyDefaults(controlPointInfo, difficulty);
|
||||
if (controlPointInfo != null && difficulty != null)
|
||||
ret.ApplyDefaults(controlPointInfo, difficulty);
|
||||
|
||||
yield return ret;
|
||||
}
|
||||
@@ -178,7 +179,8 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
ComboColour = ComboColour,
|
||||
};
|
||||
|
||||
ret.ApplyDefaults(controlPointInfo, difficulty);
|
||||
if (controlPointInfo != null && difficulty != null)
|
||||
ret.ApplyDefaults(controlPointInfo, difficulty);
|
||||
|
||||
yield return ret;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,8 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
}))
|
||||
};
|
||||
|
||||
tick.ApplyDefaults(controlPointInfo, difficulty);
|
||||
if (controlPointInfo != null && difficulty != null)
|
||||
tick.ApplyDefaults(controlPointInfo, difficulty);
|
||||
|
||||
ret.Add(tick);
|
||||
first = false;
|
||||
|
||||
Reference in New Issue
Block a user