1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 13:13:22 +08:00

Prevent null beatmap from creating an extra drawable

This commit is contained in:
Jamie Taylor 2019-03-06 18:53:53 +09:00
parent eb80549782
commit 06b65e00c4
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps.Drawables
{
// If DelayedLoadUnloadWrapper is attempting to RELOAD the same content (Beatmap), that means that it was
// previously UNLOADED and thus its children have been disposed of, so we need to recreate them here.
if (lastModel == Beatmap.Value)
if (lastModel == Beatmap.Value && Beatmap.Value != null)
return CreateDrawable(Beatmap.Value);
// If the model has changed since the previous unload (or if there was no load), then we can safely use the given content