1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 21:13:01 +08:00

Add nullchecks in Disposal where population methods return nulls

This commit is contained in:
smoogipoo 2017-11-17 22:14:28 +09:00
parent 4ced1b6490
commit ddf402d948

View File

@ -89,13 +89,13 @@ namespace osu.Game.Beatmaps
public virtual void Dispose()
{
if (BackgroundLoaded) Background.Dispose();
if (WaveformLoaded) Waveform.Dispose();
if (BackgroundLoaded) Background?.Dispose();
if (WaveformLoaded) Waveform?.Dispose();
}
public void DisposeTrack()
{
if (TrackLoaded) Track.Dispose();
if (TrackLoaded) Track?.Dispose();
}
private void applyRateAdjustments(Track t = null)