summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/com_dotnet/com_handlers.c4
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index 7a51777023..72537c9943 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 90cc44760f..749306e12b 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 <ocidl.h>
-#include "oleauto.h"
+#include <oleauto.h>
+#include <unknwn.h>
+#include <dispex.h>
#include "win32/winutil.h"
/* brain-death in winutil.h defines the macro to hide the useful function... */