Merge pull request #12261 from tsz8899/fix/window-handle-validation

[client,windows] Add window handle validation in RDP_EVENT_TYPE_WINDOW_NEW
This commit is contained in:
akallabeth
2026-02-09 08:45:04 +01:00
committed by GitHub

View File

@@ -454,6 +454,11 @@ static BOOL wf_post_connect(freerdp* instance)
{
wfc->hwnd = CreateWindowEx(0, wfc->wndClassName, wfc->window_title, dwStyle, 0, 0, 0, 0,
wfc->hWndParent, NULL, wfc->hInstance, NULL);
if (!wfc->hwnd)
{
WLog_ERR(TAG, "CreateWindowEx failed with error: %lu", GetLastError());
return FALSE;
}
SetWindowLongPtr(wfc->hwnd, GWLP_USERDATA, (LONG_PTR)wfc);
}