Skip to content

Commit

Permalink
Processing (Windows): early return if OpenProcess failed
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Jan 7, 2025
1 parent f82f300 commit 0e99486
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/processing_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0e99486

Please sign in to comment.