From 11781b28755e9d663f23eacc016912cc01a84947 Mon Sep 17 00:00:00 2001 From: de4dot Date: Mon, 31 Oct 2011 00:08:38 +0100 Subject: [PATCH] Check for null methods --- blocks/DotNetUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);