mirror of https://github.com/ppy/osu
Fix OsuScreenDependencies not caching non-leased versions
This commit is contained in:
parent
952bc96bbf
commit
395b058ff8
|
@ -26,16 +26,26 @@ public OsuScreenDependencies(bool requireLease, IReadOnlyDependencyContainer par
|
|||
Beatmap = parent.Get<LeasedBindable<WorkingBeatmap>>()?.GetBoundCopy();
|
||||
|
||||
if (Beatmap == null)
|
||||
{
|
||||
Cache(Beatmap = parent.Get<Bindable<WorkingBeatmap>>().BeginLease(false));
|
||||
CacheAs(Beatmap);
|
||||
}
|
||||
|
||||
Ruleset = parent.Get<LeasedBindable<RulesetInfo>>()?.GetBoundCopy();
|
||||
|
||||
if (Ruleset == null)
|
||||
{
|
||||
Cache(Ruleset = parent.Get<Bindable<RulesetInfo>>().BeginLease(true));
|
||||
CacheAs(Ruleset);
|
||||
}
|
||||
|
||||
Mods = parent.Get<LeasedBindable<IReadOnlyList<Mod>>>()?.GetBoundCopy();
|
||||
|
||||
if (Mods == null)
|
||||
{
|
||||
Cache(Mods = parent.Get<Bindable<IReadOnlyList<Mod>>>().BeginLease(true));
|
||||
CacheAs(Mods);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue