From 0a1d3e4437ad9ca5255123714aac902a1096c0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Fri, 27 Dec 2019 12:08:49 +0100 Subject: Don't try to connect "text_entered" signal to nodes other than LineEdit --- scene/gui/dialogs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index b6e647d1af..c7db852f90 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -443,7 +443,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(p_line_edit); + if (line_edit) + line_edit->connect("text_entered", this, "_builtin_text_entered"); } void AcceptDialog::_update_child_rects() { -- cgit v1.2.3