Commit 6b8cc32a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Clear the "surface" pointer on error in d3d9_device_CreateDepthStencilSurfaceEx().

parent b28631f6
......@@ -3474,6 +3474,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex
if (discard)
flags |= WINED3D_TEXTURE_CREATE_DISCARD;
*surface = NULL;
return d3d9_device_create_surface(device, width, height, format, flags, surface,
D3DUSAGE_DEPTHSTENCIL | usage, D3DPOOL_DEFAULT, multisample_type, multisample_quality, NULL);
}
......
......@@ -3739,7 +3739,7 @@ static void test_format_unknown(void)
hr = IDirect3DDevice9Ex_CreateDepthStencilSurfaceEx(device, 64, 64,
D3DFMT_UNKNOWN, D3DMULTISAMPLE_NONE, 0, TRUE, (IDirect3DSurface9 **)&iface, NULL, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
todo_wine ok(!iface, "Got unexpected iface %p.\n", iface);
ok(!iface, "Got unexpected iface %p.\n", iface);
iface = (void *)0xdeadbeef;
hr = IDirect3DDevice9Ex_CreateOffscreenPlainSurface(device, 64, 64,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment