From cd1da469c743784433187adf80a7efe08c7f3fc8 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 29 May 2017 11:09:26 +0900 Subject: [PATCH] Cleanup + actually fix possible nullrefs. --- osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs b/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs index 10f8e846ed..b089856dcb 100644 --- a/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs +++ b/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs @@ -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