Skip to content

Commit

Permalink
Merge pull request #51673 from Vignesh1-art/master
Browse files Browse the repository at this point in the history
Fixed crash executing TextEdit.new().set_draw_control_chars(true)
  • Loading branch information
akien-mga authored Aug 16, 2021
2 parents 7f96b2d + eb5b0d0 commit 1ee61a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4332,7 +4332,9 @@ bool TextEdit::is_highlight_all_occurrences_enabled() const {
void TextEdit::set_draw_control_chars(bool p_draw_control_chars) {
if (draw_control_chars != p_draw_control_chars) {
draw_control_chars = p_draw_control_chars;
menu->set_item_checked(menu->get_item_index(MENU_DISPLAY_UCC), draw_control_chars);
if (menu) {
menu->set_item_checked(menu->get_item_index(MENU_DISPLAY_UCC), draw_control_chars);
}
text.set_draw_control_chars(draw_control_chars);
text.invalidate_all();
update();
Expand Down

0 comments on commit 1ee61a5

Please sign in to comment.