mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 905058 - Before accessing the UIA root element make sure the global com ptr is populated. r=bbondy
This commit is contained in:
parent
4a2fc3f265
commit
ca638afd2e
@ -686,16 +686,17 @@ MetroWidget::WindowProcedure(HWND aWnd, UINT aMsg, WPARAM aWParam, LPARAM aLPara
|
||||
// UiaReturnRawElementProvider passing the return result from FrameworkView
|
||||
// OnAutomationProviderRequested as the hwnd (me scratches head) which results in
|
||||
// GetLastError always being set to invalid handle (6) after CallWindowProc returns.
|
||||
if (dwObjId == UiaRootObjectId) {
|
||||
NS_ASSERTION(gProviderRoot.Get(), "gProviderRoot is null??");
|
||||
if (dwObjId == UiaRootObjectId && gProviderRoot) {
|
||||
ComPtr<IRawElementProviderSimple> simple;
|
||||
gProviderRoot.As(&simple);
|
||||
LRESULT res = UiaReturnRawElementProvider(aWnd, aWParam, aLParam, simple.Get());
|
||||
if (res) {
|
||||
return res;
|
||||
if (simple) {
|
||||
LRESULT res = UiaReturnRawElementProvider(aWnd, aWParam, aLParam, simple.Get());
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
NS_ASSERTION(res, "UiaReturnRawElementProvider failed!");
|
||||
Log("UiaReturnRawElementProvider failed! GetLastError=%X", GetLastError());
|
||||
}
|
||||
NS_ASSERTION(res, "UiaReturnRawElementProvider failed!");
|
||||
Log("UiaReturnRawElementProvider failed! GetLastError=%X", GetLastError());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user