diff --git a/renderdoc/os/win32/sys_win32_hooks.cpp b/renderdoc/os/win32/sys_win32_hooks.cpp index 58abbc398..0669cb62c 100644 --- a/renderdoc/os/win32/sys_win32_hooks.cpp +++ b/renderdoc/os/win32/sys_win32_hooks.cpp @@ -276,6 +276,7 @@ private: *lpProcessInformation = dummy; } + bool resume = (dwCreationFlags & CREATE_SUSPENDED) == 0; dwCreationFlags |= CREATE_SUSPENDED; BOOL ret = realFunc(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, @@ -328,7 +329,10 @@ private: } } - ResumeThread(lpProcessInformation->hThread); + if(resume) + { + ResumeThread(lpProcessInformation->hThread); + } // ensure we clean up after ourselves if(dummy.dwProcessId != 0) @@ -360,6 +364,7 @@ private: *lpProcessInformation = dummy; } + bool resume = (dwCreationFlags & CREATE_SUSPENDED) == 0; dwCreationFlags |= CREATE_SUSPENDED; BOOL ret = realFunc(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, @@ -414,7 +419,10 @@ private: } } - ResumeThread(lpProcessInformation->hThread); + if(resume) + { + ResumeThread(lpProcessInformation->hThread); + } // ensure we clean up after ourselves if(dummy.dwProcessId != 0)