From 02b18fb081d7e6e7e03ed6c8a4beaca46deda14a Mon Sep 17 00:00:00 2001 From: Tom Lally Date: Fri, 2 Sep 2022 20:59:44 +0100 Subject: [PATCH] Clean return value if win32 call fails. --- src/util/SystemInfo/SystemInfoWin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/SystemInfo/SystemInfoWin.cpp b/src/util/SystemInfo/SystemInfoWin.cpp index a9e70045..cc8b69e9 100644 --- a/src/util/SystemInfo/SystemInfoWin.cpp +++ b/src/util/SystemInfo/SystemInfoWin.cpp @@ -46,6 +46,13 @@ void QueryCoreTimes(uint32 count, ProcessorTime out[]) out[i].user = sppi[i].UserTime.QuadPart; } } + else + { + for (auto i = 0; i < count; ++i) + { + out[i] = { }; + } + } } #endif \ No newline at end of file