Explorar o código

HPCC-21252 Fix runtime error getting cpu stats on windows

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday %!s(int64=6) %!d(string=hai) anos
pai
achega
ef694c8fc0
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      system/jlib/jdebug.cpp

+ 2 - 1
system/jlib/jdebug.cpp

@@ -806,8 +806,9 @@ CpuInfo CpuInfo::operator - (const CpuInfo & rhs) const
 bool CpuInfo::getProcessTimes()
 {
 #ifdef _WIN32
+    FILETIME creationTime, exitTime;
     FILETIME kernelTime, userTime;
-    GetProcessTimes(GetCurrentProcess(), nullptr, nullptr, &kernelTime, &userTime);
+    GetProcessTimes(GetCurrentProcess(), &creationTime, &exitTime, &kernelTime, &userTime);
 
     user = extractFILETIME(userTime);
     system = extractFILETIME(kernelTime);