fix support for properties without methods

This commit is contained in:
LukeFZ
2025-09-26 00:30:59 +02:00
parent 1a418280fb
commit 7a621b40c6

View File

@@ -298,6 +298,10 @@ namespace Il2CppInspector.Outputs
private PropertyDef AddProperty(ModuleDef module, TypeDef mType, PropertyInfo prop) { private PropertyDef AddProperty(ModuleDef module, TypeDef mType, PropertyInfo prop) {
PropertySig s; PropertySig s;
// Example: ZstdSharp MEM_32Bit which gets inlined using weaving and all accessors removed
if (prop.GetMethod == null && prop.SetMethod == null)
return null;
// Static or instance // Static or instance
if (prop.GetMethod?.IsStatic ?? prop.SetMethod.IsStatic) if (prop.GetMethod?.IsStatic ?? prop.SetMethod.IsStatic)
s = PropertySig.CreateStatic(GetTypeSig(module, prop.PropertyType)); s = PropertySig.CreateStatic(GetTypeSig(module, prop.PropertyType));