mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Cleanup + actually fix possible nullrefs.
This commit is contained in:
parent
cdf4fcea02
commit
cd1da469c7
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
var hitObjectY = y as DrawableHitObject;
|
||||
|
||||
// If either of the two drawables are not hit objects, fall back to the base comparer
|
||||
if ((hitObjectX?.HitObject ?? hitObjectY?.HitObject) == null)
|
||||
if (hitObjectX?.HitObject == null || hitObjectY?.HitObject == null)
|
||||
return base.Compare(x, y);
|
||||
|
||||
// Compare by start time
|
||||
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
var hitObjectY = y as DrawableHitObject;
|
||||
|
||||
// If either of the two drawables are not hit objects, fall back to the base comparer
|
||||
if ((hitObjectX?.HitObject ?? hitObjectY?.HitObject) == null)
|
||||
if (hitObjectX?.HitObject == null || hitObjectY?.HitObject == null)
|
||||
return base.Compare(x, y);
|
||||
|
||||
// Compare by start time
|
||||
|
Loading…
Reference in New Issue
Block a user