You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
fix: dict2inst crash when constructor has arguments
(cherry picked from commit 9f6b20936e)
This commit is contained in:
committed by
Rémi Verschelde
parent
a446e8671d
commit
e417528f67
@@ -1207,6 +1207,11 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
||||
|
||||
r_ret = gdscr->_new(NULL, 0, r_error);
|
||||
|
||||
if (r_error.error != Variant::CallError::CALL_OK) {
|
||||
r_ret = Variant();
|
||||
return;
|
||||
}
|
||||
|
||||
GDScriptInstance *ins = static_cast<GDScriptInstance *>(static_cast<Object *>(r_ret)->get_script_instance());
|
||||
Ref<GDScript> gd_ref = ins->get_script();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user