diff --git a/Confuser.Runtime/AntiDebug.Win32.cs b/Confuser.Runtime/AntiDebug.Win32.cs index c92bef726..f69b8652e 100644 --- a/Confuser.Runtime/AntiDebug.Win32.cs +++ b/Confuser.Runtime/AntiDebug.Win32.cs @@ -12,7 +12,7 @@ static void Initialize() { Environment.FailFast(null); //Anti dnspy Process here = GetParentProcess(); - if (here.ProcessName.ToLower().Contains("dnspy")) + if (here != null && here.ProcessName.ToLower().Contains("dnspy")) Environment.FailFast(""); var thread = new Thread(Worker);