Skip to content

Commit 13a203b

Browse files
committed
Added additional check in CreateWindowExA
1 parent 87f19aa commit 13a203b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

BorderlessAddon/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace FunctionHooks
7575
dwExStyle &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
7676
HWND result = CreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y,
7777
nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
78-
if (!mainWindow) mainWindow = result;
78+
if (!mainWindow || !::IsWindow(mainWindow)) mainWindow = result;
7979
return result;
8080
}
8181
else return CreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y,

0 commit comments

Comments
 (0)