From ab5a81737978258512798520f074cd0759726067 Mon Sep 17 00:00:00 2001
From: Andrew Fenn <andrewfenn@gmail.com>
Date: Sat, 30 Aug 2008 23:36:19 +0700
Subject: Test to see if IDirect3DSurface9 is set to null after returning D3DERR_NOTFOUND

---
 dlls/d3d9/tests/device.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 3164b81..bf90cfe 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -1364,6 +1364,13 @@ static void test_depthstenciltest(void)
     ok(hr == D3DERR_NOTFOUND && pDepthStencil2 == NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %08x\n", hr);
     if(pDepthStencil2) IDirect3DSurface9_Release(pDepthStencil2);
 
+    hr = IDirect3DDevice9_CreateDepthStencilSurface(pDevice, 800, 600, D3DFMT_D16, D3DMULTISAMPLE_NONE, 0, FALSE, &pDepthStencil2, NULL);
+    ok(hr == D3D_OK && pDepthStencil2 != NULL, "IDirect3DDevice9_CreateDepthStencilSurface failed with %08x\n", hr);
+
+    hr = IDirect3DDevice9_GetDepthStencilSurface(pDevice, &pDepthStencil2);
+    ok(hr == D3DERR_NOTFOUND && pDepthStencil2 == NULL, "IDirect3DDevice9_GetDepthStencilSurface failed with %08x pDepthStencil (%08x)\n", hr, pDepthStencil2);
+    if(pDepthStencil2) IDirect3DSurface9_Release(pDepthStencil2);
+
     /* This left the render states untouched! */
     hr = IDirect3DDevice9_GetRenderState(pDevice, D3DRS_ZENABLE, &state);
     ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr);
-- 
1.5.4.3

