diff options
author | George Marques <george@gmarqu.es> | 2018-09-19 10:37:54 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2018-09-19 11:17:47 -0300 |
commit | b1187b9a2f8e6b6d34a04a4f9e168471de737836 (patch) | |
tree | 6dd72f714d86b322910af8036dbcd95d73304c62 /modules/gdscript | |
parent | 825e85ab23ed60693eaf3970d544fe9bd15b4b07 (diff) |
GDScript: Revert extra deletion when creating instance
Revert part of e4af39cbc00446b03d142882a69813e94f0838b2 that was causing
a crash.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index d12c1f555c..b0d5422afe 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -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 |