mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix some nullrefs.
This commit is contained in:
parent
8d56a881d0
commit
18c0e431c1
@ -18,7 +18,7 @@ namespace osu.Game.Beatmaps
|
||||
public readonly BeatmapSetInfo BeatmapSetInfo;
|
||||
private readonly BeatmapDatabase database;
|
||||
|
||||
private ArchiveReader reader => database.GetReader(BeatmapSetInfo);
|
||||
private ArchiveReader reader => database?.GetReader(BeatmapSetInfo);
|
||||
|
||||
private Texture background;
|
||||
private object backgroundLock = new object();
|
||||
@ -77,7 +77,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
try
|
||||
{
|
||||
var trackData = reader.GetStream(BeatmapInfo.Metadata.AudioFile);
|
||||
var trackData = reader?.GetStream(BeatmapInfo.Metadata.AudioFile);
|
||||
if (trackData != null)
|
||||
track = new AudioTrackBass(trackData);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user