mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Fix hard crash when trying to retrieve a beatmap's track when no file is present
This commit is contained in:
parent
e032844570
commit
faf9b0a528
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user