From 639f275ce1e7be312ff03adbeae55592f10c5255 Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Fri, 9 Nov 2012 11:25:39 +0400
Subject: [PATCH 2/2] oleaut32: If pointers in
 ITypeInfo2_fnGetContainingTypeLib are null, we simply
 ignore it (eterbug #8365)

---
 dlls/oleaut32/typelib2.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index 78995de..cf5f3af 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -3712,10 +3712,14 @@ static HRESULT WINAPI ITypeInfo2_fnGetContainingTypeLib(
     ICreateTypeInfo2Impl *This = impl_from_ITypeInfo2(iface);
 
     TRACE("(%p,%p,%p)\n", iface, ppTLib, pIndex);
+    if(ppTLib)
+    {
+        *ppTLib = (ITypeLib *)&This->typelib->ITypeLib2_iface;
+        ICreateTypeLib_AddRef((ICreateTypeLib*)This->typelib);
+    }
 
-    *ppTLib = (ITypeLib *)&This->typelib->ITypeLib2_iface;
-    ICreateTypeLib_AddRef((ICreateTypeLib*)This->typelib);
-    *pIndex = This->typeinfo->typekind >> 16;
+    if(pIndex)
+        *pIndex = This->typeinfo->typekind >> 16;
 
     return S_OK;
 }
-- 
1.7.12.4
