1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Revert extra deletion when creating instance

Revert part of e4af39cbc0 that was causing
a crash.
This commit is contained in:
George Marques
2018-09-19 10:37:54 -03:00
parent 825e85ab23
commit b1187b9a2f

View File

@@ -126,10 +126,7 @@ 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
}
ERR_FAIL_COND_V(r_error.error != Variant::CallError::CALL_OK, NULL); //error constructing
}
//@TODO make thread safe