Skip to content

Commit 37a8ab0

Browse files
fix offsets waveform crash on state switch
1 parent b190bf7 commit 37a8ab0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox
215215
}
216216
waveformScrollview.onScroll = (_) ->
217217
{
218+
if (audioPreviewTracks == null || audioPreviewTracks.members == null) return;
218219
if (!audioPreviewTracks.playing)
219220
{
220221
// Move the playhead if it would go out of view.
@@ -740,6 +741,7 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox
740741

741742
override public function update(elapsed:Float)
742743
{
744+
if (audioPreviewTracks == null || audioPreviewTracks.members == null) return;
743745
super.update(elapsed);
744746

745747
if (audioPreviewTracks.playing)

0 commit comments

Comments
 (0)