mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:03:22 +08:00
Throw on OsuClickableContainer.ClearInternal()
invocations
As they may cause critical failure due to getting rid of the `Content`.
This commit is contained in:
parent
186ccc64fd
commit
0dce899634
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -46,5 +47,8 @@ namespace osu.Game.Graphics.Containers
|
||||
AddInternal(content);
|
||||
Add(CreateHoverSounds(sampleSet));
|
||||
}
|
||||
|
||||
protected override void ClearInternal(bool disposeChildren = true) =>
|
||||
throw new InvalidOperationException($"Clearing {nameof(InternalChildren)} will cause critical failure. Use {nameof(Clear)} instead.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user