diff --git a/osu.Game/Database/RealmContextFactory.cs b/osu.Game/Database/RealmContextFactory.cs index 3949494766..d0d176c780 100644 --- a/osu.Game/Database/RealmContextFactory.cs +++ b/osu.Game/Database/RealmContextFactory.cs @@ -269,14 +269,8 @@ namespace osu.Game.Database } } - private string? getRulesetShortNameFromLegacyID(long rulesetId) - { - if (efContextFactory == null) - return null; - - using (var efContext = efContextFactory.Get()) - return efContext.RulesetInfo.First(r => r.ID == rulesetId)?.ShortName; - } + private string? getRulesetShortNameFromLegacyID(long rulesetId) => + efContextFactory?.Get().RulesetInfo.First(r => r.ID == rulesetId)?.ShortName; /// /// Flush any active contexts and block any further writes.