From b42cd4b6e17ac9bbff9934a69b10c7fbb2e6f5e6 Mon Sep 17 00:00:00 2001 From: kiry vajiravuth Date: Sat, 11 Jul 2026 19:35:31 +0700 Subject: [PATCH] charteditor wont crash now --- .../debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(); }