mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 21:53:22 +08:00
Fix null checks
This commit is contained in:
parent
323b875cea
commit
a7076c329c
@ -176,7 +176,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
List<PathControlPoint> pointsInCurrentSegment = new List<PathControlPoint>();
|
List<PathControlPoint> pointsInCurrentSegment = new List<PathControlPoint>();
|
||||||
foreach (PathControlPoint point in ControlPoints)
|
foreach (PathControlPoint point in ControlPoints)
|
||||||
{
|
{
|
||||||
if (point.Type.Value is PathType)
|
if (point.Type.Value != null)
|
||||||
{
|
{
|
||||||
if (!found)
|
if (!found)
|
||||||
pointsInCurrentSegment.Clear();
|
pointsInCurrentSegment.Clear();
|
||||||
@ -199,7 +199,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
private void updatePathTypes()
|
private void updatePathTypes()
|
||||||
{
|
{
|
||||||
// Updates each segment of the slider once
|
// Updates each segment of the slider once
|
||||||
foreach (PathControlPoint controlPoint in ControlPoints.Where(p => p.Type.Value is PathType))
|
foreach (PathControlPoint controlPoint in ControlPoints.Where(p => p.Type.Value != null))
|
||||||
updatePathType(controlPoint);
|
updatePathType(controlPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user