Skip to content

Commit

Permalink
Fix potential null access in TextEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Jul 17, 2024
1 parent f4942b7 commit d4cf294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit d4cf294

Please sign in to comment.