mirror of
https://github.com/ppy/osu
synced 2025-01-20 13:00:54 +00:00
Merge pull request #8913 from smoogipoo/fix-mania-undo-redo-crash
Fix mania crashing on undo/redo
This commit is contained in:
commit
53474c74ee
@ -84,7 +84,11 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
using (var stream = new MemoryStream(state))
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user