1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:22:56 +08:00

Merge pull request #1572 from peppy/fix-nullref-on-dispose

Fix nullref on disposing BeatmapSetOverlay before load
This commit is contained in:
Dean Herbert 2017-11-23 20:18:19 +09:00 committed by GitHub
commit ccb531e6b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,7 +232,7 @@ namespace osu.Game.Overlays.BeatmapSet
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
beatmaps.BeatmapSetAdded -= handleBeatmapAdd;
if (beatmaps != null) beatmaps.BeatmapSetAdded -= handleBeatmapAdd;
}
private void handleBeatmapAdd(BeatmapSetInfo beatmap)