Module: wine Branch: master Commit: 6e4e1ad392871f9f67fbd69dd9c71eb5d74763ba URL: http://source.winehq.org/git/wine.git/?a=commit;h=6e4e1ad392871f9f67fbd69dd9...
Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Aug 21 15:15:49 2013 +0200
wined3d: Properly allocate heap memory for volumes.
---
dlls/wined3d/volume.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 50d9a75..cdc7125 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -184,7 +184,16 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, volume, map_desc, box, flags);
if (!volume->resource.allocatedMemory) - volume->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, volume->resource.size); + { + volume->resource.heap_memory = wined3d_resource_allocate_sysmem(volume->resource.size); + if (!volume->resource.heap_memory) + { + WARN("Out of memory.\n"); + map_desc->data = NULL; + return E_OUTOFMEMORY; + } + volume->resource.allocatedMemory = volume->resource.heap_memory; + }
TRACE("allocatedMemory %p.\n", volume->resource.allocatedMemory);