diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7e2d859..1aa676c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1307,6 +1307,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, Depth, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool)); +if (object->resource.allocatedMemory == NULL) + object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *object->resource.allocatedMemory); +if (object->resource.allocatedMemory == NULL) { + IWineD3DVolume_Release((IWineD3DVolume *) object); + ERR("HeapAlloc failed."); + return E_OUTOFMEMORY; +} object->currentDesc.Width = Width; object->currentDesc.Height = Height; object->currentDesc.Depth = Depth;