Aric Stewart : quartz: Return E_OUTOFMEMORY of the StdMemAllocator is unable to allocate memory.

Alexandre Julliard julliard at winehq.org
Sat Sep 18 07:42:24 CDT 2010


Module: wine
Branch: master
Commit: ac6db331ac4d23ded42ed8fda31a518f865b3ce3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ac6db331ac4d23ded42ed8fda31a518f865b3ce3

Author: Aric Stewart <aric at codeweavers.com>
Date:   Fri Sep 17 13:59:28 2010 -0500

quartz: Return E_OUTOFMEMORY of the StdMemAllocator is unable to allocate memory.

---

 dlls/quartz/memallocator.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index a1c4473..c0be482 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -802,6 +802,9 @@ static HRESULT StdMemAllocator_Alloc(IMemAllocator * iface)
     /* allocate memory */
     This->pMemory = VirtualAlloc(NULL, (This->base.props.cbBuffer + This->base.props.cbPrefix) * This->base.props.cBuffers, MEM_COMMIT, PAGE_READWRITE);
 
+    if (!This->pMemory)
+        return E_OUTOFMEMORY;
+
     for (i = This->base.props.cBuffers - 1; i >= 0; i--)
     {
         /* pbBuffer does not start at the base address, it starts at base + cbPrefix */




More information about the wine-cvs mailing list