mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Safeguard against potential finalise-before-initialised
This commit is contained in:
parent
a57b6bdc18
commit
4648362214
@ -136,10 +136,13 @@ namespace osu.Game.Beatmaps
|
||||
trackedUpdateCancellationSource?.Cancel();
|
||||
trackedUpdateCancellationSource = null;
|
||||
|
||||
foreach (var c in linkedCancellationSources)
|
||||
c.Dispose();
|
||||
if (linkedCancellationSources != null)
|
||||
{
|
||||
foreach (var c in linkedCancellationSources)
|
||||
c.Dispose();
|
||||
|
||||
linkedCancellationSources.Clear();
|
||||
linkedCancellationSources.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -239,7 +242,7 @@ namespace osu.Game.Beatmaps
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
cancelTrackedBindableUpdate();
|
||||
updateScheduler.Dispose();
|
||||
updateScheduler?.Dispose();
|
||||
}
|
||||
|
||||
private readonly struct DifficultyCacheLookup : IEquatable<DifficultyCacheLookup>
|
||||
|
Loading…
Reference in New Issue
Block a user