You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
GDScript: Revert extra deletion when creating instance
Revert part of e4af39cbc0 that was causing
a crash.
This commit is contained in:
@@ -126,11 +126,8 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco
|
||||
GDScriptLanguage::singleton->lock->unlock();
|
||||
#endif
|
||||
|
||||
if (r_error.error != Variant::CallError::CALL_OK) {
|
||||
memdelete(instance);
|
||||
ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing
|
||||
}
|
||||
}
|
||||
|
||||
//@TODO make thread safe
|
||||
return instance;
|
||||
|
||||
Reference in New Issue
Block a user