Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_client.c:
- *huianode = NULL;
- if (!IsWindow(hwnd))
return UIA_E_ELEMENTNOTAVAILABLE;
- node = heap_alloc_zero(sizeof(*node));
- if (!node)
return E_OUTOFMEMORY;
- node->hwnd = hwnd;
- node->IWineUiaNode_iface.lpVtbl = &uia_node_vtbl;
- node->ref = 1;
- hr = uia_get_provider_from_hwnd(node);
- if (FAILED(hr) || !node->prov)
When can node->prov be NULL while hr is successful? It doesn't seem right to give the caller a NULL pointer with a successful hr.