Henri Verbeet : wined3d: Set appropriate error codes in IWineD3DDeviceImpl_Init3D() on out of memory.

Alexandre Julliard julliard at winehq.org
Wed Dec 2 10:22:12 CST 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Dec  2 10:41:20 2009 +0100

wined3d: Set appropriate error codes in IWineD3DDeviceImpl_Init3D() on out of memory.

---

 dlls/wined3d/device.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 136f396..98c5002 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1783,11 +1783,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
     This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*));
     if(!This->palettes || !This->render_targets || !This->draw_buffers) {
         ERR("Out of memory!\n");
+        hr = E_OUTOFMEMORY;
         goto err_out;
     }
     This->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256);
     if(!This->palettes[0]) {
         ERR("Out of memory!\n");
+        hr = E_OUTOFMEMORY;
         goto err_out;
     }
     for (i = 0; i < 256; ++i) {




More information about the wine-cvs mailing list