diff --git a/source/SongCore/Utilities/Hashing.cs b/source/SongCore/Utilities/Hashing.cs index cf5ebd0..5366bcc 100644 --- a/source/SongCore/Utilities/Hashing.cs +++ b/source/SongCore/Utilities/Hashing.cs @@ -128,14 +128,16 @@ public static string GetCustomLevelHash(BeatmapLevel level) { var hash = string.Empty; - var loadedSaveData = Loader.CustomLevelLoader._loadedBeatmapSaveData[level.levelID]; - if (loadedSaveData.standardLevelInfoSaveData != null) + if (Loader.CustomLevelLoader._loadedBeatmapSaveData.TryGetValue(level.levelID, out var loadedSaveData)) { - hash = GetCustomLevelHash(loadedSaveData.customLevelFolderInfo, loadedSaveData.standardLevelInfoSaveData); - } - else if (loadedSaveData.beatmapLevelSaveData != null) - { - hash = GetCustomLevelHash(loadedSaveData.customLevelFolderInfo, loadedSaveData.beatmapLevelSaveData); + if (loadedSaveData.standardLevelInfoSaveData != null) + { + hash = GetCustomLevelHash(loadedSaveData.customLevelFolderInfo, loadedSaveData.standardLevelInfoSaveData); + } + else if (loadedSaveData.beatmapLevelSaveData != null) + { + hash = GetCustomLevelHash(loadedSaveData.customLevelFolderInfo, loadedSaveData.beatmapLevelSaveData); + } } return hash;