Skip to content

Commit

Permalink
Parent process null check
Browse files Browse the repository at this point in the history
Fixed a crash in case the parent process exited.
  • Loading branch information
daver32 authored Sep 6, 2019
1 parent 9d8aa9c commit ced38d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Confuser.Runtime/AntiDebug.Win32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ced38d1

Please sign in to comment.