mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 18:44:15 +08:00
Fix hard crash when trying to retrieve a beatmap's track when no file is present
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user