1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 18:33:04 +08:00

Don't create a new drawable for the first background

This commit is contained in:
smoogipoo 2019-05-23 15:59:22 +09:00
parent 48ef1ae200
commit 7971261fbc

View File

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