mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 05:39:53 +08:00
Detach score during import tests to ensure original object doesn't get managed
This commit is contained in:
@@ -192,6 +192,8 @@ namespace osu.Game.Tests.Scores.IO
|
||||
{
|
||||
var beatmapManager = osu.Dependencies.Get<BeatmapManager>();
|
||||
|
||||
// clone to avoid attaching the input score to realm.
|
||||
score = score.DeepClone();
|
||||
score.BeatmapInfo ??= beatmapManager.GetAllUsableBeatmapSets().First().Beatmaps.First();
|
||||
score.Ruleset ??= new OsuRuleset().RulesetInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user