Merge pull request #18720 from RandomShaper/fix-gdnative-leak

Fix Variant leak in call_native
This commit is contained in:
Rémi Verschelde 2018-05-08 22:09:35 +02:00 committed by GitHub
commit a79f4ac382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -469,7 +469,9 @@ Variant GDNative::call_native(StringName p_native_call_type, StringName p_proced
godot_variant result = E->get()(procedure_handle, (godot_array *)&p_arguments);
return *(Variant *)&result;
Variant res = *(Variant *)&result;
godot_variant_destroy(&result);
return res;
}
Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle, bool p_optional) {