diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-16 14:27:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-16 14:27:47 +0200 |
commit | 1ee61a501f1f01d619b85d3de53cef76914885e2 (patch) | |
tree | 218163caef392a83aa915914f78fdba275cd0f11 /scene/gui/text_edit.cpp | |
parent | 7f96b2d9a73d7e600a69263837d404620d192fe4 (diff) | |
parent | eb5b0d013f22ae0f56d95732b4f0cbacb37b0ce6 (diff) |
Merge pull request #51673 from Vignesh1-art/master
Fixed crash executing TextEdit.new().set_draw_control_chars(true)
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 745920fcdd..a2c5769947 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -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(); |