1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Fix unsafe manipulation of parent's children from child

This commit is contained in:
Dean Herbert 2020-10-19 17:41:21 +09:00
parent 79a17b2371
commit 4024b44a53

View File

@ -145,11 +145,19 @@ namespace osu.Game.Rulesets.Catch.UI
}
};
trailsTarget.Add(trails = new CatcherTrailDisplay(this));
trails = new CatcherTrailDisplay(this);
updateCatcher();
}
protected override void LoadComplete()
{
base.LoadComplete();
// don't add in above load as we may potentially modify a parent in an unsafe manner.
trailsTarget.Add(trails);
}
/// <summary>
/// Creates proxied content to be displayed beneath hitobjects.
/// </summary>