d3d8: Do not modify the "texture" pointer for D3DFMT_UNKNOWN in d3d8_device_CreateCubeTexture().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-02-09 12:52:39 +01:00 committed by Alexandre Julliard
parent 5ec48e76ad
commit 9e16f478c1
2 changed files with 4 additions and 1 deletions

View file

@ -853,6 +853,9 @@ static HRESULT WINAPI d3d8_device_CreateCubeTexture(IDirect3DDevice8 *iface, UIN
TRACE("iface %p, edge_length %u, levels %u, usage %#x, format %#x, pool %#x, texture %p.\n",
iface, edge_length, levels, usage, format, pool, texture);
if (!format)
return D3DERR_INVALIDCALL;
*texture = NULL;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)

View file

@ -8236,7 +8236,7 @@ static void test_format_unknown(void)
hr = IDirect3DDevice8_CreateCubeTexture(device, 64, 1, 0,
D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, (IDirect3DCubeTexture8 **)&iface);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
todo_wine ok(iface == (void *)0xdeadbeef, "Got unexpected iface %p.\n", iface);
ok(iface == (void *)0xdeadbeef, "Got unexpected iface %p.\n", iface);
iface = (void *)0xdeadbeef;
hr = IDirect3DDevice8_CreateVolumeTexture(device, 64, 64, 1, 1, 0,