Detach gameplay score from replay recorder before importing

Closes #13320.
This commit is contained in:
Dean Herbert
2021-06-04 01:59:56 +09:00
parent daff4a1a00
commit d444fed46f
3 changed files with 14 additions and 3 deletions

View File

@ -30,12 +30,14 @@ namespace osu.Game.Rulesets.UI
{
set
{
if (recorder != null)
if (value != null && recorder != null)
throw new InvalidOperationException("Cannot attach more than one recorder");
recorder?.Expire();
recorder = value;
KeyBindingContainer.Add(recorder);
if (recorder != null)
KeyBindingContainer.Add(recorder);
}
}