summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-26 09:30:51 +0200
committerGitHub <noreply@github.com>2017-09-26 09:30:51 +0200
commitccb4a6acee24ca0e0f14599364e171b7b88f8ac4 (patch)
tree92989903fc4d1958a46f65ab2b429ed0e817cdcd
parent59c3f61d57e745db2eb5ee2eab9c4cac17105f7b (diff)
parentc5f071705309596dafe3352302e9e416f3e09760 (diff)
Merge pull request #11600 from volzhs/fix-crash-lineedit
Fix crash when scene has LineEdit and run from editor
-rw-r--r--scene/gui/line_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index aa5ae089bf..8ca487f2bd 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -534,7 +534,7 @@ void LineEdit::_notification(int p_what) {
switch (p_what) {
#ifdef TOOLS_ENABLED
case NOTIFICATION_ENTER_TREE: {
- if (!get_tree()->is_node_being_edited(this)) {
+ if (Engine::get_singleton()->is_editor_hint() && !get_tree()->is_node_being_edited(this)) {
cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false));
cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65));