mirror of
https://github.com/ppy/osu
synced 2025-03-05 19:11:52 +00:00
Add null-checks to comparers.
This commit is contained in:
parent
e7ecc479c9
commit
0bcec4e61a
@ -34,6 +34,9 @@ namespace osu.Game.Modes.Osu
|
|||||||
{
|
{
|
||||||
public int Compare(ReplayFrame f1, ReplayFrame f2)
|
public int Compare(ReplayFrame f1, ReplayFrame f2)
|
||||||
{
|
{
|
||||||
|
if (f1 == null) throw new NullReferenceException($@"{nameof(f1)} cannot be null");
|
||||||
|
if (f2 == null) throw new NullReferenceException($@"{nameof(f2)} cannot be null");
|
||||||
|
|
||||||
return f1.Time.CompareTo(f2.Time);
|
return f1.Time.CompareTo(f2.Time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user