From b64b11c64d0b76e3bd36180ef3f2305548a433b8 Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Fri, 24 May 2013 18:05:14 +0400
Subject: [PATCH 1/2] oleaut32: Ignore NULL ppTLib/pIndex in
 ITypeInfo2_fnGetContainingTypeLib

---
 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 1aeb27a..4ffc005 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -3707,9 +3707,13 @@ static HRESULT WINAPI ITypeInfo2_fnGetContainingTypeLib(
 
     TRACE("(%p,%p,%p)\n", iface, ppTLib, pIndex);
 
-    *ppTLib = (ITypeLib *)&This->typelib->ITypeLib2_iface;
-    ICreateTypeLib_AddRef((ICreateTypeLib*)This->typelib);
-    *pIndex = This->typeinfo->typekind >> 16;
+    if(ppTLib)
+        {
+            *ppTLib = (ITypeLib *)&This->typelib->ITypeLib2_iface;
+            ICreateTypeLib_AddRef((ICreateTypeLib*)This->typelib);
+        }
+    if(pIndex)
+        *pIndex = This->typeinfo->typekind >> 16;
 
     return S_OK;
 }
-- 
1.8.1.6
