Skip to content

Commit c3d9a09

Browse files
committed
resultsdata null check
1 parent 618f195 commit c3d9a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MultiplayerExtensions/OverrideClasses/GameStateControllerStub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private void StartLevel()
184184
private void handleLevelFinished(MultiplayerLevelScenesTransitionSetupDataSO sceneSetupData, MultiplayerResultsData resultsData)
185185
{
186186
string? hash = Utilities.Utils.LevelIdToHash(sceneSetupData.previewBeatmapLevel.levelID);
187-
if (hash != null)
187+
if (hash != null && resultsData != null && resultsData.localPlayerResultData?.levelCompletionResults != null)
188188
_ = Statistics.PlayMap(hash, sceneSetupData.beatmapDifficulty.ToString(), sceneSetupData.beatmapCharacteristic.serializedName, (int)Math.Floor(resultsData.localPlayerResultData.levelCompletionResults.endSongTime), (int)ExtendedPlayerManager.localPlatform, MPState.CurrentMasterServer.hostname);
189189
}
190190

0 commit comments

Comments
 (0)