summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-31 12:54:48 +0100
committerGitHub <noreply@github.com>2019-12-31 12:54:48 +0100
commit406dac1917eaa002fe27128c161ae681f59a556d (patch)
tree5309108b7e9f5ffd6b450e997acb84163aa08757
parent219a21737d5d72469595fecb4620eaa1eb150854 (diff)
parent0a1d3e4437ad9ca5255123714aac902a1096c0a0 (diff)
Merge pull request #34633 from qarmin/lineedit_signal
Don't try to connect "text_entered" signal to nodes other than LineEdit
-rw-r--r--scene/gui/dialogs.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index cc2d5dd6ea..24ba0c3e6d 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -444,7 +444,9 @@ bool AcceptDialog::has_autowrap() {
void AcceptDialog::register_text_enter(Node *p_line_edit) {
ERR_FAIL_NULL(p_line_edit);
- p_line_edit->connect("text_entered", this, "_builtin_text_entered");
+ LineEdit *line_edit = Object::cast_to<LineEdit>(p_line_edit);
+ if (line_edit)
+ line_edit->connect("text_entered", this, "_builtin_text_entered");
}
void AcceptDialog::_update_child_rects() {