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

André Hentschel nerv at dawncrow.de
Sat Jul 30 09:58:58 CDT 2011


should fix http://test.winehq.org/data/c1aaacd58c505548351defcb1077c65e8bd59fc3/win7_fg-win7u64fr-t32/oleaut32:tmarshal.html
---
 dlls/oleaut32/tests/tmarshal.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index c64c68a..2897c1f 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -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);
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list