Fix error on opening script after documentation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user