From 3a93499f899c68db38b68239f227e381e5ded20e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 27 Nov 2018 19:55:37 -0300 Subject: [PATCH] Allow signal connecting even if script is invalid (only when compiled with tools), fixes #17070 --- core/object.cpp | 16 ++++++++++++++-- core/script_language.h | 1 + modules/gdnative/nativescript/nativescript.cpp | 4 ++++ modules/gdnative/nativescript/nativescript.h | 1 + .../gdnative/pluginscript/pluginscript_script.h | 1 + modules/gdscript/gdscript.cpp | 1 - modules/gdscript/gdscript.h | 2 +- modules/mono/csharp_script.cpp | 4 ++++ modules/mono/csharp_script.h | 2 ++ modules/visual_script/visual_script.cpp | 4 ++++ modules/visual_script/visual_script.h | 1 + 11 files changed, 33 insertions(+), 4 deletions(-) diff --git a/core/object.cpp b/core/object.cpp index ea77090a455..3a14c7c0b55 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1443,8 +1443,20 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str if (!s) { bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal); //check in script - if (!signal_is_valid && !script.is_null() && Ref