Merge pull request #117375 from kitbdev/fix-te-menu-error

Fix error on opening script after documentation
This commit is contained in:
Rémi Verschelde 2026-03-16 23:41:20 +01:00
commit 280e06c2fe
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 10 additions and 4 deletions

View file

@ -135,8 +135,6 @@ ConnectionInfoDialog::ConnectionInfoDialog() {
////////////////////////////////////////////////////////////////////////////////
void ScriptTextEditor::EditMenusSTE::_update_breakpoint_list() {
TextEditorBase *script_text_editor = _get_active_editor();
ERR_FAIL_NULL(script_text_editor);
breakpoints_menu->clear();
breakpoints_menu->reset_size();
@ -145,6 +143,11 @@ void ScriptTextEditor::EditMenusSTE::_update_breakpoint_list() {
breakpoints_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_breakpoint"), DEBUG_GOTO_NEXT_BREAKPOINT);
breakpoints_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_breakpoint"), DEBUG_GOTO_PREV_BREAKPOINT);
TextEditorBase *script_text_editor = _get_active_editor();
if (script_text_editor == nullptr) {
return;
}
PackedInt32Array breakpoint_list = script_text_editor->get_code_editor()->get_text_editor()->get_breakpointed_lines();
if (breakpoint_list.is_empty()) {
return;