Update winmain.cpp

This commit is contained in:
Lwmte 2025-03-22 10:37:36 +01:00
parent e27ec86e85
commit 8427ae7706

View file

@ -639,7 +639,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
void WinClose()
{
CloseHandle((HANDLE)ConsoleThreadHandle);
if (ConsoleThreadHandle)
CloseHandle((HANDLE)ConsoleThreadHandle);
WaitForSingleObject((HANDLE)ThreadHandle, 5000);
DestroyAcceleratorTable(hAccTable);