mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-22 05:03:42 +00:00
Fix an issue where the Random button would crash Freeplay.
This commit is contained in:
parent
f1811a8594
commit
195f366b65
|
|
@ -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