Parcourir la source

Merge pull request #90274 from AThousandShips/syntax_fix

Fix potential null access in `TextEdit`
Rémi Verschelde il y a 1 an
Parent
commit
82b0186372
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -8143,7 +8143,7 @@ void TextEdit::_update_gutter_width() {
 
 
 /* Syntax highlighting. */
 /* Syntax highlighting. */
 Dictionary TextEdit::_get_line_syntax_highlighting(int p_line) {
 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. */
 /* Deprecated. */