1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

list can not be null in ControlPointInfo.cs

This commit is contained in:
Miterosan 2017-11-07 23:08:24 +01:00
parent e430256b09
commit 840946d160

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Lists;
@ -85,6 +86,9 @@ namespace osu.Game.Beatmaps.ControlPoints
private T binarySearch<T>(SortedList<T> list, double time, T prePoint = null)
where T : ControlPoint, new()
{
if (list == null)
throw new ArgumentNullException(nameof(list));
if (list.Count == 0)
return new T();