Skip to content

Commit 0e99486

Browse files
committed
Processing (Windows): early return if OpenProcess failed
1 parent f82f300 commit 0e99486

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/processing_windows.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ bool ffProcessGetInfoWindows(uint32_t pid, uint32_t* ppid, FFstrbuf* pname, FFst
169169
? GetCurrentProcess()
170170
: OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
171171

172+
if (hProcess == INVALID_HANDLE_VALUE)
173+
return false;
174+
172175
if (gui)
173176
*gui = GetGuiResources(hProcess, GR_GDIOBJECTS) > 0;
174177

0 commit comments

Comments
 (0)