Processing (Windows): early return if OpenProcess failed

This commit is contained in:
李通洲
2025-01-06 16:39:44 +08:00
parent f82f3002e4
commit 0e99486efe
+3
View File
@@ -169,6 +169,9 @@ bool ffProcessGetInfoWindows(uint32_t pid, uint32_t* ppid, FFstrbuf* pname, FFst
? GetCurrentProcess()
: OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
if (hProcess == INVALID_HANDLE_VALUE)
return false;
if (gui)
*gui = GetGuiResources(hProcess, GR_GDIOBJECTS) > 0;