mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Fix mania crashing on undo/redo
This commit is contained in:
parent
1cb3f39f60
commit
9bec42bc7e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user