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 <cmcadams@codeweavers.com>
This commit is contained in:
Connor McAdams 2023-10-30 08:43:38 -04:00 committed by Alexandre Julliard
parent 4ed0a49618
commit 0cbca47dae

View file

@ -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);
}