From 0cbca47dae968ecaa720ae0ba0b2ac491e62fa1a Mon Sep 17 00:00:00 2001 From: Connor McAdams Date: Mon, 30 Oct 2023 08:43:38 -0400 Subject: [PATCH] uiautomationcore: Don't set HRESULT when attempting to advise currently focused HUIANODE. create_uia_node_from_hwnd() is expected to fail if the HWND doesn't have a native serverside provider. Signed-off-by: Connor McAdams --- dlls/uiautomationcore/uia_com_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/uiautomationcore/uia_com_client.c b/dlls/uiautomationcore/uia_com_client.c index 5c0d0cd0b9e..43b16db74f8 100644 --- a/dlls/uiautomationcore/uia_com_client.c +++ b/dlls/uiautomationcore/uia_com_client.c @@ -1372,8 +1372,7 @@ static HRESULT uia_event_handlers_add_handler(IUnknown *handler_iface, SAFEARRAY { HUIANODE node = NULL; - hr = create_uia_node_from_hwnd(info.hwndFocus, &node, NODE_FLAG_IGNORE_CLIENTSIDE_HWND_PROVS); - if (SUCCEEDED(hr)) + if (SUCCEEDED(create_uia_node_from_hwnd(info.hwndFocus, &node, NODE_FLAG_IGNORE_CLIENTSIDE_HWND_PROVS))) uia_com_focus_handler_advise_node(event, node, info.hwndFocus); UiaNodeRelease(node); }