Fix crash when gd-script _init fail
This commit is contained in:
parent
bed3b7f092
commit
4ccdbde845
1 changed files with 1 additions and 1 deletions
|
@ -1440,8 +1440,8 @@ GDInstance* GDScript::_create_instance(const Variant** p_args,int p_argcount,Obj
|
|||
|
||||
if (err.error!=Variant::CallError::CALL_OK) {
|
||||
instance->script=Ref<GDScript>();
|
||||
instance->owner->set_script_instance(NULL);
|
||||
instances.erase(p_owner);
|
||||
memdelete(instance);
|
||||
ERR_FAIL_COND_V(err.error!=Variant::CallError::CALL_OK, NULL); //error consrtucting
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue