diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx index b1c523acb..8c82f406b 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx @@ -120,7 +120,7 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox var customKind:Null = event?.target?.text; chartEditorState.noteKindToPlace = customKind; - if (toolboxNotesNoteKind.value.id != '~CUSTOM~') return; + if (toolboxNotesNoteKind.value == null || toolboxNotesNoteKind.value.id != '~CUSTOM~') return; if (!_initializing && chartEditorState.currentNoteSelection.length > 0) { @@ -149,8 +149,9 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox toolboxNotesCustomKind.pauseEvent(UIEvent.CHANGE, true); toolboxNotesCustomKind.value = chartEditorState.noteKindToPlace; - toolboxNotesNoteKind.value = ChartEditorDropdowns.lookupNoteKind(chartEditorState.noteKindToPlace); - if (toolboxNotesNoteKind.value.id == '~CUSTOM~' && chartEditorState.noteKindToPlace != null) + var noteKindEntry = ChartEditorDropdowns.lookupNoteKind(chartEditorState.noteKindToPlace); + toolboxNotesNoteKind.value = noteKindEntry; + if (noteKindEntry.id == '~CUSTOM~' && chartEditorState.noteKindToPlace != null) { showCustom(); }