Check if cctor exists before using it
This commit is contained in:
parent
406afd01e3
commit
c019e21743
|
@ -247,6 +247,7 @@ namespace de4dot.code.deobfuscators.ConfuserEx
|
|||
AddMethodsToBeRemoved(_controlFlowFixer.NativeMethods, "Control flow native methods");
|
||||
|
||||
var moduleCctor = DotNetUtils.GetModuleTypeCctor(module);
|
||||
if (moduleCctor != null)
|
||||
foreach (var instr in moduleCctor.Body.Instructions)
|
||||
if (instr.OpCode == OpCodes.Call && instr.Operand is MethodDef
|
||||
&& toRemoveFromCctor.Contains((MethodDef) instr.Operand))
|
||||
|
|
Loading…
Reference in New Issue
Block a user