From 15b3ca6740c56227af6bf03ca66028e42dbe5431 Mon Sep 17 00:00:00 2001 From: ImThour Date: Tue, 18 Feb 2025 05:09:45 +0530 Subject: [PATCH] Update OutputThread.cpp --- PresentMon/OutputThread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PresentMon/OutputThread.cpp b/PresentMon/OutputThread.cpp index 47d5f20f..50f38fe6 100644 --- a/PresentMon/OutputThread.cpp +++ b/PresentMon/OutputThread.cpp @@ -159,6 +159,10 @@ static void ProcessProcessEvent( if (!pr.second) { HandleTerminatedProcess(info); + if (info->mHandle != NULL) { + CloseHandle(info->mHandle); + info->mHandle = NULL; + } } info->mHandle = NULL;