mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:07:33 +08: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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user