summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2017-09-26 16:19:02 +0900
committervolzhs <volzhs@gmail.com>2017-09-26 16:19:02 +0900
commitc5f071705309596dafe3352302e9e416f3e09760 (patch)
tree92989903fc4d1958a46f65ab2b429ed0e817cdcd
parent59c3f61d57e745db2eb5ee2eab9c4cac17105f7b (diff)
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));