1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:53:22 +08:00

Fix mania crashing on undo/redo

This commit is contained in:
smoogipoo 2020-04-30 20:03:46 +09:00
parent 1cb3f39f60
commit 9bec42bc7e

View File

@ -84,7 +84,11 @@ namespace osu.Game.Screens.Edit
{ {
using (var stream = new MemoryStream(state)) using (var stream = new MemoryStream(state))
using (var reader = new LineBufferedReader(stream, true)) using (var reader = new LineBufferedReader(stream, true))
return new PassThroughWorkingBeatmap(Decoder.GetDecoder<Beatmap>(reader).Decode(reader)).GetPlayableBeatmap(editorBeatmap.BeatmapInfo.Ruleset); {
var decoded = Decoder.GetDecoder<Beatmap>(reader).Decode(reader);
decoded.BeatmapInfo.Ruleset = editorBeatmap.BeatmapInfo.Ruleset;
return new PassThroughWorkingBeatmap(decoded).GetPlayableBeatmap(editorBeatmap.BeatmapInfo.Ruleset);
}
} }
private class PassThroughWorkingBeatmap : WorkingBeatmap private class PassThroughWorkingBeatmap : WorkingBeatmap