dxdiagn: Fix a return value and avoid validating the input parameter for IDxDiagProviderImpl::GetContainer.
This commit is contained in:
parent
dddf714f02
commit
e1dd6a869d
|
@ -110,11 +110,8 @@ static HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface
|
|||
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
|
||||
TRACE("(%p,%p)\n", iface, ppInstance);
|
||||
|
||||
if (NULL == ppInstance) {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
if (FALSE == This->init) {
|
||||
return E_INVALIDARG; /* should be E_CO_UNINITIALIZED */
|
||||
return CO_E_NOTINITIALIZED;
|
||||
}
|
||||
if (NULL == This->pRootContainer) {
|
||||
hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &This->pRootContainer);
|
||||
|
|
|
@ -107,12 +107,10 @@ static void test_GetRootContainer(void)
|
|||
|
||||
/* Test calling IDxDiagProvider::GetRootContainer before initialization. */
|
||||
hr = IDxDiagProvider_GetRootContainer(pddp, NULL);
|
||||
todo_wine
|
||||
ok(hr == CO_E_NOTINITIALIZED,
|
||||
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
|
||||
|
||||
hr = IDxDiagProvider_GetRootContainer(pddp, &pddc);
|
||||
todo_wine
|
||||
ok(hr == CO_E_NOTINITIALIZED,
|
||||
"Expected IDxDiagProvider::GetRootContainer to return CO_E_NOTINITIALIZED, got %x\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue