Fix error on opening script after documentation

This commit is contained in:
kit
2026-03-12 13:41:59 -04:00
parent a8e37fc010
commit e5a66b7628
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -133,8 +133,6 @@ void TextEditorBase::EditMenus::_change_syntax_highlighter(int p_idx) {
}
void TextEditorBase::EditMenus::_update_bookmark_list() {
TextEditorBase *script_text_editor = _get_active_editor();
ERR_FAIL_NULL(script_text_editor);
bookmarks_menu->clear();
bookmarks_menu->reset_size();
@@ -143,6 +141,11 @@ void TextEditorBase::EditMenus::_update_bookmark_list() {
bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT);
bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV);
TextEditorBase *script_text_editor = _get_active_editor();
if (script_text_editor == nullptr) {
return;
}
PackedInt32Array bookmark_list = script_text_editor->code_editor->get_text_editor()->get_bookmarked_lines();
if (bookmark_list.is_empty()) {
return;