aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/gdnative.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez2018-05-08 21:23:59 +0200
committerHein-Pieter van Braam2018-05-13 21:55:19 +0200
commitc8ce9c00805be16d660057079a665114507409df (patch)
tree2b7c2fa4f7479b86f675ae975d2e2355652bd2d9 /modules/gdnative/gdnative.cpp
parenta519dcd57653c8ce21dbb823c9c363c28ef447d5 (diff)
downloadgodot-c8ce9c00805be16d660057079a665114507409df.tar.gz
godot-c8ce9c00805be16d660057079a665114507409df.tar.zst
godot-c8ce9c00805be16d660057079a665114507409df.zip
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
-rw-r--r--modules/gdnative/gdnative.cpp4
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) {