Fix incorrect pointer marshalling from Variant to managed runtime

#1992
This commit is contained in:
Wojtek Figat
2023-11-28 11:22:14 +01:00
parent 17dca8c5c7
commit fd938e8284
3 changed files with 10 additions and 5 deletions

View File

@@ -1208,6 +1208,10 @@ void* MUtils::VariantToManagedArgPtr(Variant& value, MType* type, bool& failed)
object = nullptr;
return object;
}
case MTypes::Ptr:
if (value.Type.Type == VariantType::Null)
return nullptr;
return (void*)value;
default:
break;
}