Fix VisualScript crash with null object

This commit is contained in:
Ev1lbl0w 2021-10-13 12:19:29 +01:00
parent 8bdeee04f0
commit e57f8fd083
No known key found for this signature in database
GPG key ID: B383693E3746E58A

View file

@ -2232,6 +2232,7 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int
}
void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p_signal, Array p_binds) {
ERR_FAIL_NULL(p_obj);
Vector<Variant> binds;
for (int i = 0; i < p_binds.size(); i++) {
binds.push_back(p_binds[i]);