Skip to content

Commit

Permalink
Prevent null strings in OriginalName (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 authored Sep 28, 2024
1 parent 3da4963 commit d422f5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Il2CppInterop.Generator/Passes/Pass22GenerateEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public static void DoPass(RewriteGlobalContext context)
newType.CustomAttributes.Add(new CustomAttribute(
(ICustomAttributeType)assemblyContext.Imports.OriginalNameAttributector.Value,
new CustomAttributeSignature(
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Module!.Name),
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Namespace),
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Name))));
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Module?.Name ?? ""),
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Namespace ?? ""),
new CustomAttributeArgument(assemblyContext.Imports.Module.String(), type.Name ?? ""))));
}

if (type.CustomAttributes.Any(it => it.Constructor?.DeclaringType?.FullName == "System.FlagsAttribute"))
Expand Down

0 comments on commit d422f5b

Please sign in to comment.