From 782a52020a9823bb7dc744ab20849f2558b64652 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周六, 14 12月 2024 17:23:54 +0800 Subject: [PATCH] Update WinRegistry --- src/core/qwindowkit_windows.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp index 51a6f33..58c3d0f 100644 --- a/src/core/qwindowkit_windows.cpp +++ b/src/core/qwindowkit_windows.cpp @@ -8,9 +8,11 @@ static RTL_OSVERSIONINFOW GetRealOSVersionImpl() { HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll"); + Q_ASSERT(hMod); using RtlGetVersionPtr = NTSTATUS(WINAPI *)(PRTL_OSVERSIONINFOW); auto pRtlGetVersion = reinterpret_cast<RtlGetVersionPtr>(::GetProcAddress(hMod, "RtlGetVersion")); + Q_ASSERT(pRtlGetVersion); RTL_OSVERSIONINFOW rovi{}; rovi.dwOSVersionInfoSize = sizeof(rovi); pRtlGetVersion(&rovi); @@ -86,5 +88,4 @@ return qMakePair(value, ok); } #endif - } \ No newline at end of file -- Gitblit v1.9.1