Browse Source

Merge pull request #443 from 0x53A/master

Fix a NullReferenceException: Modules can exist without an Assembly
pull/449/head
Daniel Grunwald 12 years ago
parent
commit
392277b6f8
  1. 4
      ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs

4
ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs

@ -54,8 +54,8 @@ namespace ICSharpCode.Decompiler.Disassembler @@ -54,8 +54,8 @@ namespace ICSharpCode.Decompiler.Disassembler
output.WriteLine("// Method begins at RVA 0x{0:x4}", method.RVA);
output.WriteLine("// Code size {0} (0x{0:x})", body.CodeSize);
output.WriteLine(".maxstack {0}", body.MaxStackSize);
if (method.DeclaringType.Module.Assembly.EntryPoint == method)
output.WriteLine (".entrypoint");
if (method.DeclaringType.Module.Assembly != null && method.DeclaringType.Module.Assembly.EntryPoint == method)
output.WriteLine (".entrypoint");
if (method.Body.HasVariables) {
output.Write(".locals ");

Loading…
Cancel
Save