diff options
| author | Pedro J. Estébanez | 2018-05-08 21:23:59 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-05-13 21:55:19 +0200 |
| commit | c8ce9c00805be16d660057079a665114507409df (patch) | |
| tree | 2b7c2fa4f7479b86f675ae975d2e2355652bd2d9 /modules/gdnative/gdnative.cpp | |
| parent | a519dcd57653c8ce21dbb823c9c363c28ef447d5 (diff) | |
| download | godot-c8ce9c00805be16d660057079a665114507409df.tar.gz godot-c8ce9c00805be16d660057079a665114507409df.tar.zst godot-c8ce9c00805be16d660057079a665114507409df.zip | |
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
| -rw-r--r-- | modules/gdnative/gdnative.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 42c3028f2..1fa0f7f5c 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -306,7 +306,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) { |
