Fix #4 - null hwnd dereference in RefreshData

The global hwnd was shadowed by a local variable declaration in
_tWinMain, leaving the global permanently NULL. RefreshData() passed
this NULL handle to DisableAllButtons(), dereferencing it on every
Refresh click. Removing the local type specifier assigns the created
window to the global so all callers outside _tWinMain see a valid handle.

Fixes #4
This commit is contained in:
Tamir Suliman
2026-06-06 13:23:00 +02:00
parent 1b6ab4892c
commit 208a70c4b3
+1 -1
View File
@@ -586,7 +586,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm
HWND hwnd = CreateWindowEx(
hwnd = CreateWindowEx(
WS_EX_APPWINDOW, // Extended window styles
_T("DeviceInfoApp"), // Window class name
_T("FIDO2.1 Manager"), // Window title