summaryrefslogtreecommitdiffstats
path: root/loader/dshow/allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader/dshow/allocator.c')
-rw-r--r--loader/dshow/allocator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c
index 34d453727e..379b859d4c 100644
--- a/loader/dshow/allocator.c
+++ b/loader/dshow/allocator.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include "allocator.h"
#include "com.h"
#include "wine/winerror.h"
@@ -286,8 +287,10 @@ static void MemAllocator_ResetPointer(MemAllocator* This)
static void MemAllocator_Destroy(MemAllocator* This)
{
Debug printf("MemAllocator_Destroy(%p) called (%d, %d)\n", This, This->refcount, AllocatorKeeper);
+#ifdef WIN32_LOADER
if (--AllocatorKeeper == 0)
UnregisterComClass(&CLSID_MemoryAllocator, MemAllocator_CreateAllocator);
+#endif
free(This->vt);
free(This);
}
@@ -338,8 +341,10 @@ MemAllocator* MemAllocatorCreate()
This->interfaces[0]=IID_IUnknown;
This->interfaces[1]=IID_IMemAllocator;
+#ifdef WIN32_LOADER
if (AllocatorKeeper++ == 0)
RegisterComClass(&CLSID_MemoryAllocator, MemAllocator_CreateAllocator);
+#endif
return This;
}