Browse Source

Merge pull request #75758 from Pylgos/fix-gdextension-variant-construction

Fix GDExtension Variant type conversion
Rémi Verschelde 2 years ago
parent
commit
b8bf28e2b6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/variant/variant_internal.h

+ 1 - 1
core/variant/variant_internal.h

@@ -1541,7 +1541,7 @@ struct VariantTypeConstructor {
 
 	_FORCE_INLINE_ static void type_from_variant(void *r_value, void *p_variant) {
 		// r_value is provided by caller as uninitialized memory
-		memnew_placement(r_value, T(VariantInternalAccessor<T>::get(reinterpret_cast<Variant *>(p_variant))));
+		memnew_placement(r_value, T(*reinterpret_cast<Variant *>(p_variant)));
 	}
 };