- Merge from trunk up to r45543
[reactos.git] / dll / win32 / mapi32 / imalloc.c
index a913eee..351c38b 100644 (file)
@@ -32,6 +32,7 @@
 #include "objbase.h"
 #include "shlwapi.h"
 #include "mapiutil.h"
+#include "util.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(mapi);
@@ -63,6 +64,9 @@ LPMALLOC WINAPI MAPIGetDefaultMalloc(void)
 {
     TRACE("()\n");
 
+    if (mapiFunctions.MAPIGetDefaultMalloc)
+        return mapiFunctions.MAPIGetDefaultMalloc();
+
     IMalloc_AddRef((LPMALLOC)&MAPI_IMalloc);
     return (LPMALLOC)&MAPI_IMalloc;
 }