fix potential crash if PID is not running

This commit is contained in:
Pavel Yosifovich
2023-10-08 19:52:18 -04:00
parent f886961a44
commit 3067daf830
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ CString ProcessHelper::GetProcessName(DWORD pid) {
}
::CloseHandle(hSnap);
}
name = processes.at(pid);
if (auto it = processes.find(pid); it != processes.end())
name = it->second;
}
return name;
}
+1 -1
View File
@@ -223,7 +223,7 @@
<DllDataFileName />
</Midl>
<PostBuildEvent>
<Command>signtool sign /i DigiCert /fd sha256 $(TargetPath)</Command>
<Command>signtool sign /i DigiCert /n "Pavel Yosifovich" /fd sha256 $(TargetPath)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>