Ensure detached when performing model Clone operations on BeatmapInfo/ScoreInfo

This commit is contained in:
Dean Herbert
2022-01-14 13:08:20 +09:00
parent 54804ebfbd
commit 9b33fbbee5
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ namespace osu.Game.Beatmaps
public int BeatmapVersion;
public BeatmapInfo Clone() => (BeatmapInfo)MemberwiseClone();
public BeatmapInfo Clone() => (BeatmapInfo)this.Detach().MemberwiseClone();
public override string ToString() => this.GetDisplayTitle();

View File

@ -131,7 +131,7 @@ namespace osu.Game.Scoring
public ScoreInfo DeepClone()
{
var clone = (ScoreInfo)MemberwiseClone();
var clone = (ScoreInfo)this.Detach().MemberwiseClone();
clone.Statistics = new Dictionary<HitResult, int>(clone.Statistics);