GDExtension: Use correct return pointer for validated calls that return Variant

This commit is contained in:
David Snopek 2023-10-09 10:59:45 -05:00
parent 42425baa59
commit 88b6fee547

View File

@ -234,7 +234,7 @@ public:
void *ret_opaque = nullptr;
if (r_ret) {
VariantInternal::initialize(r_ret, return_value_info.type);
ret_opaque = VariantInternal::get_opaque_pointer(r_ret);
ret_opaque = r_ret->get_type() == Variant::NIL ? r_ret : VariantInternal::get_opaque_pointer(r_ret);
}
ptrcall(p_object, argptrs, ret_opaque);