mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Fix OsuScreenDependencies not caching non-leased versions
This commit is contained in:
parent
952bc96bbf
commit
395b058ff8
@ -26,16 +26,26 @@ namespace osu.Game.Screens
|
||||
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
Block a user