Fix hard crash when trying to retrieve a beatmap's track when no file is present

This commit is contained in:
Dean Herbert 2020-09-01 15:48:13 +09:00
parent e032844570
commit faf9b0a528

View File

@ -70,6 +70,9 @@ namespace osu.Game.Beatmaps
protected override Track GetBeatmapTrack()
{
if (Metadata?.AudioFile == null)
return null;
try
{
return trackStore.Get(getPathForFile(Metadata.AudioFile));
@ -83,6 +86,9 @@ namespace osu.Game.Beatmaps
protected override Waveform GetWaveform()
{
if (Metadata?.AudioFile == null)
return null;
try
{
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));