1
0
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:
Dean Herbert 2016-11-09 15:49:31 +09:00
parent 8d56a881d0
commit 18c0e431c1

View File

@ -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);
}