Make sure method operand isn't null

This commit is contained in:
de4dot 2012-02-05 22:52:34 +01:00
parent 542c6bb213
commit 18f020912d

View File

@ -623,6 +623,8 @@ namespace de4dot.blocks {
if (call.OpCode.Code != Code.Call && call.OpCode.Code != Code.Callvirt)
continue;
var methodRef = call.Operand as MethodReference;
if (methodRef == null)
continue;
var type = DotNetUtils.getType(module, methodRef.DeclaringType);
var methodDef = DotNetUtils.getMethod(type, methodRef);
if (methodDef != null) {