Alexandre Julliard : oleaut32/tests: Don' t crash if ITypeInfo_GetTypeAttr fails.
Alexandre Julliard
julliard at winehq.org
Fri May 8 08:06:29 CDT 2009
Module: wine
Branch: master
Commit: 8b7269e7e6dd50e0f53031eee1472826a34de734
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8b7269e7e6dd50e0f53031eee1472826a34de734
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri May 8 14:27:11 2009 +0200
oleaut32/tests: Don't crash if ITypeInfo_GetTypeAttr fails.
---
dlls/oleaut32/tests/typelib.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 93920c5..277e97d 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -772,15 +772,17 @@ if(use_midl_tlb) {
hr = ITypeInfo_GetTypeAttr(pTI, &pTA);
ok(hr == S_OK, "hr %08x\n", hr);
- ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
- ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
-if(use_midl_tlb) {
- ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags);
- }
- ok(pTA->cFuncs == 8, "cfuncs %d\n", pTA->cFuncs);
- ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
- ITypeInfo_ReleaseTypeAttr(pTI, pTA);
-
+ if (hr == S_OK)
+ {
+ ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
+ ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
+ if(use_midl_tlb) {
+ ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags);
+ }
+ ok(pTA->cFuncs == 8, "cfuncs %d\n", pTA->cFuncs);
+ ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
+ ITypeInfo_ReleaseTypeAttr(pTI, pTA);
+ }
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href);
ok(hr == S_OK, "hr %08x\n", hr);
hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p);
More information about the wine-cvs
mailing list