From 261b38b06fcc254357e24aa33daa5e27daf756cf Mon Sep 17 00:00:00 2001 From: flustix Date: Wed, 20 Mar 2024 17:50:38 +0100 Subject: [PATCH] Fix keycount not being changeable --- fluXis.Game/Screens/Edit/EditorMap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluXis.Game/Screens/Edit/EditorMap.cs b/fluXis.Game/Screens/Edit/EditorMap.cs index 4d241116..067a31db 100644 --- a/fluXis.Game/Screens/Edit/EditorMap.cs +++ b/fluXis.Game/Screens/Edit/EditorMap.cs @@ -71,8 +71,8 @@ public void SetKeyMode(int mode) public bool CanChangeTo(int mode) { - var highestLane = MapInfo.HitObjects.MaxBy(o => o.Lane).Lane; - highestLane = Math.Max(highestLane, MapEvents.LaneSwitchEvents.MaxBy(o => o.Count).Count); + var highestLane = MapInfo.HitObjects.MaxBy(o => o.Lane)?.Lane ?? 0; + highestLane = Math.Max(highestLane, MapEvents.LaneSwitchEvents.MaxBy(o => o.Count)?.Count ?? 0); return highestLane <= mode; }