mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
dxdiagn: Fix a return value and avoid validating the input parameter for IDxDiagProviderImpl::GetContainer.
This commit is contained in:
parent
dddf714f02
commit
e1dd6a869d
2 changed files with 1 additions and 6 deletions
|
@ -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 a new issue