From 80292961adeaa391840ff0d1f352a25281ecf3b4 Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Mon, 9 May 2016 06:31:05 -0700 Subject: [PATCH] Continue after close old process #5277 --- src/lib/synwinhk/synwinhk.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/synwinhk/synwinhk.cpp b/src/lib/synwinhk/synwinhk.cpp index 8638f244..5aed9f3f 100644 --- a/src/lib/synwinhk/synwinhk.cpp +++ b/src/lib/synwinhk/synwinhk.cpp @@ -934,8 +934,10 @@ init(DWORD threadID) // old process (probably) still exists so refuse to // reinitialize this DLL (and thus steal it from the // old process). - CloseHandle(process); - return 0; + int result = CloseHandle(process); + if (result == false) { + return 0; + } } // clean up after old process. the system should've already