Commit e1dd6a86 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

dxdiagn: Fix a return value and avoid validating the input parameter for…

dxdiagn: Fix a return value and avoid validating the input parameter for IDxDiagProviderImpl::GetContainer.
parent dddf714f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment