Skip to content

Commit

Permalink
fix: terminate f3d process if its still active (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-droid authored Feb 18, 2024
1 parent a5ecb6b commit f59fb8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions winshellext/F3DThumbnailProvider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ IFACEMETHODIMP F3DThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_A
// Clean up
DWORD exitCode = EXIT_SUCCESS;
GetExitCodeProcess(pi.hProcess, &exitCode);

// Terminate the process if it is still active
if (exitCode == STILL_ACTIVE)
{
TerminateProcess(pi.hProcess, EXIT_FAILURE);
GetExitCodeProcess(pi.hProcess, &exitCode);
}

CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
Expand Down

0 comments on commit f59fb8d

Please sign in to comment.