1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 01:43:15 +08:00

Fix potential nullref caused by test data.

This commit is contained in:
Dean Herbert 2017-03-02 18:35:24 +09:00
parent 51950eef43
commit 68a359698d
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -88,7 +88,7 @@ namespace osu.Game.Database
return ID == other?.ID;
}
public bool AudioEquals(BeatmapInfo other) => other != null &&
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
BeatmapSet.Path == other.BeatmapSet.Path &&
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
}