From 67c5770e127e328f4243b5b1c1d250833238266f Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Thu, 4 Dec 2025 20:28:54 -0600 Subject: [PATCH] add check for fNonExistFile pointer --- src/xp_activate32.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xp_activate32.cc b/src/xp_activate32.cc index 59bcca5..dcf71e0 100644 --- a/src/xp_activate32.cc +++ b/src/xp_activate32.cc @@ -1065,6 +1065,9 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine fNonExistFile = freopen("CONOUT$", "w", stdout); // Standard error fNonExistFile = freopen("CONOUT$", "w", stderr); // Standard out #endif // __MINGW32__ + if (!fNonExistFile) { + return 1; + } LPWSTR cmdLine = GetCommandLineW(); if (cmdLine == nullptr || cmdLine == NULL) {