diff --git a/blocks/DotNetUtils.cs b/blocks/DotNetUtils.cs index c2ff2488..4bbc7146 100644 --- a/blocks/DotNetUtils.cs +++ b/blocks/DotNetUtils.cs @@ -327,7 +327,7 @@ namespace de4dot.blocks { public static IList getCodeStrings(MethodDefinition method) { var strings = new List(); - if (method.HasBody) { + if (method != null && method.Body != null) { foreach (var instr in method.Body.Instructions) { if (instr.OpCode.Code == Code.Ldstr) strings.Add((string)instr.Operand);