Fix an issue where the Random button would crash Freeplay.

This commit is contained in:
EliteMasterEric 2024-03-27 17:43:15 -04:00
parent f1811a8594
commit 195f366b65

View file

@ -399,10 +399,16 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
return sound;
}
@:nullSafety(Off)
public override function destroy():Void
{
// trace('[FunkinSound] Destroying sound "${this._label}"');
super.destroy();
if (fadeTween != null)
{
fadeTween.cancel();
fadeTween = null;
}
FlxTween.cancelTweensOf(this);
this._label = 'unknown';
}