From 960b6528cad6209f20180f84586940ec9d8cc79f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 8 Mar 2022 19:36:23 +0900 Subject: [PATCH] Ensure the value used during realm async write is the same as whe compared for equality --- .../Screens/Play/PlayerSettings/BeatmapOffsetControl.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs b/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs index d4babe3e9f..9e280fdca2 100644 --- a/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs +++ b/osu.Game/Screens/Play/PlayerSettings/BeatmapOffsetControl.cs @@ -167,10 +167,12 @@ namespace osu.Game.Screens.Play.PlayerSettings if (settings == null) // only the case for tests. return; - if (settings.Offset == Current.Value) + double val = Current.Value; + + if (settings.Offset == val) return; - settings.Offset = Current.Value; + settings.Offset = val; }); } }