mirror of
https://github.com/ppy/osu
synced 2024-12-13 10:28:17 +00:00
Merge pull request #20479 from peppy/fix-drawable-mutation-misc
Fix potential crash on game exit due to incorrect scheduling of realm change handler
This commit is contained in:
commit
525de8c140
@ -123,7 +123,7 @@ namespace osu.Game.Overlays.FirstRunSetup
|
||||
beatmapSubscription?.Dispose();
|
||||
}
|
||||
|
||||
private void beatmapsChanged(IRealmCollection<BeatmapSetInfo> sender, ChangeSet? changes, Exception error)
|
||||
private void beatmapsChanged(IRealmCollection<BeatmapSetInfo> sender, ChangeSet? changes, Exception error) => Schedule(() =>
|
||||
{
|
||||
currentlyLoadedBeatmaps.Text = FirstRunSetupBeatmapScreenStrings.CurrentlyLoadedBeatmaps(sender.Count);
|
||||
|
||||
@ -139,7 +139,7 @@ namespace osu.Game.Overlays.FirstRunSetup
|
||||
currentlyLoadedBeatmaps.ScaleTo(1.1f)
|
||||
.ScaleTo(1, 1500, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
private void downloadTutorial()
|
||||
{
|
||||
|
@ -58,6 +58,9 @@ namespace osu.Game.Rulesets.Configuration
|
||||
pendingWrites.Clear();
|
||||
}
|
||||
|
||||
if (!changed.Any())
|
||||
return true;
|
||||
|
||||
realm?.Write(r =>
|
||||
{
|
||||
foreach (var c in changed)
|
||||
|
Loading…
Reference in New Issue
Block a user