From f27387c68cd1533c1aa2114208ae9a2ed5172be5 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 13 Oct 2003 01:29:39 +0000 Subject: [PATCH] Fix possible segfault (this one came up when a method could not be found). Add a couple of headers used by another file that is not yet ready to commit. --- ext/com_dotnet/com_handlers.c | 4 +++- ext/com_dotnet/php_com_dotnet_internal.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 7a51777023a..72537c99430 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -316,7 +316,9 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS ITypeComp_Release(bindptr.lptcomp); break; } - ITypeInfo_Release(TI); + if (TI) { + ITypeInfo_Release(TI); + } } ITypeComp_Release(comp); efree(olename); diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index 90cc44760f2..749306e12b2 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -24,7 +24,9 @@ #define _WIN32_DCOM #define COBJMACROS #include -#include "oleauto.h" +#include +#include +#include #include "win32/winutil.h" /* brain-death in winutil.h defines the macro to hide the useful function... */