Skip to content

Commit

Permalink
[AssemblyProcessor] Fix a case where ImportReference was not called f…
Browse files Browse the repository at this point in the history
…or GetTypeFromHandle().
  • Loading branch information
xen2 committed May 24, 2019
1 parent f554045 commit e2c44d3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Git LFS file not shown
Git LFS file not shown
2 changes: 1 addition & 1 deletion deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.exe
Git LFS file not shown
2 changes: 1 addition & 1 deletion deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.pdb
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ private static void GenerateSerializerCode(ComplexSerializerRegistry registry)
{
// Generating: System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(<#=type.Value.SerializerType.ConvertCSharp()#>).TypeHandle);
initializeMethodIL.Append(Instruction.Create(OpCodes.Ldtoken, type.Value.SerializerType));
initializeMethodIL.Append(Instruction.Create(OpCodes.Call, getTypeFromHandleMethod));
initializeMethodIL.Append(Instruction.Create(OpCodes.Call, assembly.MainModule.ImportReference(getTypeFromHandleMethod)));
initializeMethodIL.Append(Instruction.Create(OpCodes.Callvirt, getTypeHandleMethodRef));
initializeMethodIL.Append(Instruction.Create(OpCodes.Call, runClassConstructorMethod));
}
Expand Down

0 comments on commit e2c44d3

Please sign in to comment.