Fix Variant leak in call_native

(cherry picked from commit 474eda9e30)
This commit is contained in:
Pedro J. Estébanez 2018-05-08 21:23:59 +02:00 committed by Hein-Pieter van Braam
parent a519dcd576
commit c8ce9c0080

View file

@ -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) {