oleaut32/tests: Only use interface if we succeeded in recreating it.

This commit is contained in:
André Hentschel 2011-07-30 16:58:58 +02:00 committed by Alexandre Julliard
parent f98369f21c
commit 862cc73fb4
1 changed files with 6 additions and 3 deletions

View File

@ -995,10 +995,13 @@ static void test_typelibmarshal(void)
ok_ole_success(hr, CoUnmarshalInterface);
IStream_Release(pStream);
hr = IKindaEnumWidget_Next(pKEW, &pWidget);
ok_ole_success(hr, IKindaEnumWidget_Next);
if (hr == S_OK)
{
hr = IKindaEnumWidget_Next(pKEW, &pWidget);
ok_ole_success(hr, IKindaEnumWidget_Next);
IKindaEnumWidget_Release(pKEW);
IKindaEnumWidget_Release(pKEW);
}
hr = IWidget_QueryInterface(pWidget, &IID_IDispatch, (void **)&pDispatch);
ok_ole_success(hr, IWidget_QueryInterface);