diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index 34054472487..d03bcba34c9 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -42,10 +42,7 @@ IDirect3D8 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT sdk_version) TRACE("sdk_version %#x.\n", sdk_version); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate d3d8 object memory.\n"); return NULL; - } if (!d3d8_init(object)) { diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d9c337ae201..a94d3bd646d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -723,10 +723,7 @@ static HRESULT WINAPI d3d8_device_CreateTexture(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = texture_init(object, device, width, height, levels, usage, format, pool); if (FAILED(hr)) @@ -755,10 +752,7 @@ static HRESULT WINAPI d3d8_device_CreateVolumeTexture(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate volume texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = volumetexture_init(object, device, width, height, depth, levels, usage, format, pool); if (FAILED(hr)) @@ -786,10 +780,7 @@ static HRESULT WINAPI d3d8_device_CreateCubeTexture(IDirect3DDevice8 *iface, UIN object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate cube texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = cubetexture_init(object, device, edge_length, levels, usage, format, pool); if (FAILED(hr)) @@ -817,10 +808,7 @@ static HRESULT WINAPI d3d8_device_CreateVertexBuffer(IDirect3DDevice8 *iface, UI object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = vertexbuffer_init(object, device, size, usage, fvf, pool); if (FAILED(hr)) @@ -848,10 +836,7 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = indexbuffer_init(object, device, size, usage, format, pool); if (FAILED(hr)) @@ -2150,7 +2135,6 @@ static HRESULT WINAPI d3d8_device_CreateVertexShader(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { - ERR("Failed to allocate vertex shader memory.\n"); *shader = 0; return E_OUTOFMEMORY; } @@ -2216,10 +2200,7 @@ static struct d3d8_vertex_declaration *d3d8_device_get_fvf_declaration(struct d3 TRACE("not found. Creating and inserting at position %d.\n", low); if (!(d3d8_declaration = HeapAlloc(GetProcessHeap(), 0, sizeof(*d3d8_declaration)))) - { - ERR("Memory allocation failed.\n"); return NULL; - } if (FAILED(hr = d3d8_vertex_declaration_init_fvf(d3d8_declaration, device, fvf))) { @@ -2532,10 +2513,7 @@ static HRESULT WINAPI d3d8_device_CreatePixelShader(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate pixel shader memmory.\n"); return E_OUTOFMEMORY; - } wined3d_mutex_lock(); handle = d3d8_allocate_handle(&device->handle_table, object, D3D8_HANDLE_PS); diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index 4070b3ebc49..61d187d0de7 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -364,10 +364,7 @@ static HRESULT WINAPI d3d8_CreateDevice(IDirect3D8 *iface, UINT adapter, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate device memory.\n"); return E_OUTOFMEMORY; - } hr = device_init(object, d3d8, d3d8->wined3d, adapter, device_type, focus_window, flags, parameters); if (FAILED(hr)) diff --git a/dlls/d3d8/shader.c b/dlls/d3d8/shader.c index db36120eee5..f7096bb3834 100644 --- a/dlls/d3d8/shader.c +++ b/dlls/d3d8/shader.c @@ -61,10 +61,7 @@ static HRESULT d3d8_vertexshader_create_vertexdeclaration(struct d3d8_device *de object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Memory allocation failed.\n"); return E_OUTOFMEMORY; - } hr = d3d8_vertex_declaration_init(object, device, declaration, shader_handle); if (FAILED(hr)) diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index 6686c0f5335..e9f49760acb 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -183,10 +183,7 @@ HRESULT d3d8_swapchain_create(struct d3d8_device *device, struct wined3d_swapcha HRESULT hr; if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate swapchain memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = swapchain_init(object, device, desc))) {