1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix potential crash due to cross-thread TrackVirtualManual.Stop

This commit is contained in:
Dean Herbert 2020-07-28 12:08:15 +09:00
parent e3b782dca6
commit df3e2cc640

View File

@ -305,8 +305,10 @@ namespace osu.Game.Tests.Visual
{
double refTime = referenceClock.CurrentTime;
if (lastReferenceTime.HasValue)
accumulated += (refTime - lastReferenceTime.Value) * Rate;
double? lastRefTime = lastReferenceTime;
if (lastRefTime != null)
accumulated += (refTime - lastRefTime.Value) * Rate;
lastReferenceTime = refTime;
}