Jozef Kucia : d3dx9/tests: Don't leak D3DXBuffer.
Alexandre Julliard
julliard at winehq.org
Fri Mar 9 12:34:18 CST 2012
Module: wine
Branch: master
Commit: fde2abbabf6210f17b7f5311646006191b05b56c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fde2abbabf6210f17b7f5311646006191b05b56c
Author: Jozef Kucia <joseph.kucia at gmail.com>
Date: Wed Mar 7 21:33:37 2012 +0100
d3dx9/tests: Don't leak D3DXBuffer.
---
dlls/d3dx9_36/tests/mesh.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 390197d..d24326f 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -2471,10 +2471,6 @@ static void D3DXCreateBoxTest(void)
return;
}
- hr = D3DXCreateBuffer(36 * sizeof(DWORD), &ppBuffer);
- ok(hr==D3D_OK, "Expected D3D_OK, received %#x\n", hr);
- if (FAILED(hr)) goto end;
-
hr = D3DXCreateBox(device,2.0f,20.0f,4.9f,NULL, &ppBuffer);
todo_wine ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
@@ -2490,6 +2486,7 @@ static void D3DXCreateBoxTest(void)
hr = D3DXCreateBox(device,22.0f,20.0f,-4.9f,&box, &ppBuffer);
todo_wine ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
+ ppBuffer = NULL;
hr = D3DXCreateBox(device,10.9f,20.0f,4.9f,&box, &ppBuffer);
todo_wine ok(hr==D3D_OK, "Expected D3D_OK, received %#x\n", hr);
@@ -2508,7 +2505,7 @@ static void D3DXCreateBoxTest(void)
end:
IDirect3DDevice9_Release(device);
IDirect3D9_Release(d3d);
- ID3DXBuffer_Release(ppBuffer);
+ if (ppBuffer) ID3DXBuffer_Release(ppBuffer);
DestroyWindow(wnd);
}
More information about the wine-cvs
mailing list