summaryrefslogtreecommitdiffstats
path: root/core/object.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2015-12-11 12:22:09 +0100
committerRémi Verschelde <remi@verschelde.fr>2015-12-11 12:22:09 +0100
commit9e000f12a16a0e110e4c505dfb0d98c3f0a8e790 (patch)
treee33d1b046ecaf6a023e0ec66161a42f0d324cca0 /core/object.cpp
parent3b68f0d051ac33a95e78025622c5f93219591da9 (diff)
parente4dce93520ce69e68fed68a4886b6f68ac3e98a7 (diff)
downloadredot-engine-9e000f12a16a0e110e4c505dfb0d98c3f0a8e790.tar.gz
Merge pull request #3038 from TheHX/pr-script-signal
Fix error message when using is_connected with a script signal
Diffstat (limited to 'core/object.cpp')
-rw-r--r--core/object.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 96f0c86832..f6ba76a0b5 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1405,6 +1405,10 @@ bool Object::is_connected(const StringName& p_signal, Object *p_to_object, const
bool signal_is_valid = ObjectTypeDB::has_signal(get_type_name(),p_signal);
if (signal_is_valid)
return false;
+
+ if (!script.is_null() && Ref<Script>(script)->has_script_signal(p_signal))
+ return false;
+
ERR_EXPLAIN("Nonexistent signal: "+p_signal);
ERR_FAIL_COND_V(!s,false);
}