Fix error message when using is_connected with a script signal
This commit is contained in:
parent
5f3c87691e
commit
e4dce93520
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue