mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-18 12:51:26 -05:00
Fix an issue where the Random button would crash Freeplay.
This commit is contained in:
parent
f1811a8594
commit
195f366b65
1 changed files with 6 additions and 0 deletions
|
@ -399,10 +399,16 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
|
||||||
return sound;
|
return sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@:nullSafety(Off)
|
||||||
public override function destroy():Void
|
public override function destroy():Void
|
||||||
{
|
{
|
||||||
// trace('[FunkinSound] Destroying sound "${this._label}"');
|
// trace('[FunkinSound] Destroying sound "${this._label}"');
|
||||||
super.destroy();
|
super.destroy();
|
||||||
|
if (fadeTween != null)
|
||||||
|
{
|
||||||
|
fadeTween.cancel();
|
||||||
|
fadeTween = null;
|
||||||
|
}
|
||||||
FlxTween.cancelTweensOf(this);
|
FlxTween.cancelTweensOf(this);
|
||||||
this._label = 'unknown';
|
this._label = 'unknown';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue