From d4cf294b35c9c1ad9e4b43e06d7c30b80f1c789e Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 5 Apr 2024 18:36:18 +0200 Subject: [PATCH] Fix potential null access in `TextEdit` --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 9cc59f1def77..a51ef143fa53 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -8143,7 +8143,7 @@ void TextEdit::_update_gutter_width() { /* Syntax highlighting. */ Dictionary TextEdit::_get_line_syntax_highlighting(int p_line) { - return syntax_highlighter.is_null() && !setting_text ? Dictionary() : syntax_highlighter->get_line_syntax_highlighting(p_line); + return (syntax_highlighter.is_null() || setting_text) ? Dictionary() : syntax_highlighter->get_line_syntax_highlighting(p_line); } /* Deprecated. */