Merge pull request #47592 from jmb462/fix-VisualScriptFunctionState-connect-to-null-signal-crash

Fix VisualScriptFunctionState connect to null object crash (Fix #47572)
This commit is contained in:
Rémi Verschelde 2021-04-05 12:15:58 +02:00 committed by GitHub
commit 33b8f1448e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2252,6 +2252,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]);