Skip to content

Commit

Permalink
fix: fix crash in LatencyState when exiting / cleaning up state data
Browse files Browse the repository at this point in the history
  • Loading branch information
lemz1 authored and ninjamuffin99 committed Oct 4, 2024
1 parent b0b73c8 commit 39b1a42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/funkin/ui/debug/latency/LatencyState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ class LatencyState extends MusicBeatSubState
PreciseInputManager.instance.onInputPressed.remove(preciseInputPressed);
PreciseInputManager.instance.onInputReleased.remove(preciseInputReleased);

FlxG.sound.music.volume = previousVolume;
if (FlxG.sound.music != null)
{
FlxG.sound.music.volume = previousVolume;
}

swagSong.stop();
FlxG.sound.list.remove(swagSong);

Expand Down

0 comments on commit 39b1a42

Please sign in to comment.