mirror of
https://github.com/godotengine/godot
synced 2024-09-05 01:38:26 +00:00
GDScript: Revert extra deletion when creating instance
Revert part of e4af39cbc0
that was causing
a crash.
This commit is contained in:
parent
825e85ab23
commit
b1187b9a2f
|
@ -126,10 +126,7 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco
|
||||||
GDScriptLanguage::singleton->lock->unlock();
|
GDScriptLanguage::singleton->lock->unlock();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (r_error.error != Variant::CallError::CALL_OK) {
|
ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing
|
||||||
memdelete(instance);
|
|
||||||
ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@TODO make thread safe
|
//@TODO make thread safe
|
||||||
|
|
Loading…
Reference in a new issue