1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Add guard when clearing samples

This commit is contained in:
Bartłomiej Dach 2020-12-14 22:53:00 +01:00
parent 7b350fc8e5
commit a31e8d137f

View File

@ -303,6 +303,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
samplesBindable.CollectionChanged -= onSamplesChanged; samplesBindable.CollectionChanged -= onSamplesChanged;
// Release the samples for other hitobjects to use. // Release the samples for other hitobjects to use.
if (Samples != null)
Samples.Samples = null; Samples.Samples = null;
if (nestedHitObjects.IsValueCreated) if (nestedHitObjects.IsValueCreated)