From 2f1080be9b032b1cf5086201e45057baa6b1a179 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 7 Mar 2020 11:17:18 +0000 Subject: Convert syntax highlighters into a resource --- editor/code_editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/code_editor.cpp') diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 70747b4956..9e1a5f2d43 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1408,9 +1408,9 @@ Variant CodeTextEditor::get_edit_state() { state["bookmarks"] = text_editor->get_bookmarks_array(); state["syntax_highlighter"] = TTR("Standard"); - SyntaxHighlighter *syntax_highlighter = text_editor->_get_syntax_highlighting(); - if (syntax_highlighter) { - state["syntax_highlighter"] = syntax_highlighter->get_name(); + Ref syntax_highlighter = text_editor->get_syntax_highlighting(); + if (syntax_highlighter.is_valid()) { + state["syntax_highlighter"] = syntax_highlighter->_get_name(); } return state; -- cgit v1.2.3