Added sanity check in getReplayPairViewerData

This commit is contained in:
nise.moe 2024-03-04 17:22:32 +01:00
parent e23bd3e559
commit 33f6db24ae

View File

@ -53,6 +53,10 @@ class ScoreService(
val replay1 = getReplayViewerData(replay1Id) ?: return null val replay1 = getReplayViewerData(replay1Id) ?: return null
val replay2 = getReplayViewerData(replay2Id) ?: return null val replay2 = getReplayViewerData(replay2Id) ?: return null
if(replay1.beatmap != replay2.beatmap) {
return null
}
return ReplayPairViewerData( return ReplayPairViewerData(
beatmap = replay1.beatmap, beatmap = replay1.beatmap,
replay1 = replay1.replay, replay1 = replay1.replay,