Merge pull request #90274 from AThousandShips/syntax_fix

Fix potential null access in `TextEdit`
This commit is contained in:
Rémi Verschelde 2024-07-17 15:44:37 +02:00
commit 82b0186372
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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. */