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
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D

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