From 42977738aba59150109fea3e9edd2b74643c1000 Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周一, 09 12月 2024 11:47:44 +0800
Subject: [PATCH] Minor improvements of Win32 code

---
 src/core/qwindowkit_windows.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp
index a9cc371..c022e26 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);

--
Gitblit v1.9.1