[PATCH] d3d9: check that surface is allocated (Coverity)
Marcus Meissner
meissner at suse.de
Thu Nov 24 11:12:32 CST 2011
Hi,
continue if there are errors and "surface" is not initialized.
CID 5480
Ciao, Marcus
---
dlls/d3d9/tests/surface.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c
index eb6e65c..80d8199 100644
--- a/dlls/d3d9/tests/surface.c
+++ b/dlls/d3d9/tests/surface.c
@@ -725,12 +725,14 @@ static void test_surface_lockrect_blocks(IDirect3DDevice9 *device)
ok(SUCCEEDED(hr), "IDirect3DTexture9_GetSurfaceLevel failed (%08x)\n", hr);
IDirect3DTexture9_Release(texture);
}
+ if (FAILED(hr)) continue;
break;
case D3DPOOL_SCRATCH:
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 128, 128, formats[i].fmt,
pools[j].pool, &surface, 0);
ok(SUCCEEDED(hr), "CreateOffscreenPlainSurface failed (%08x)\n", hr);
+ if (FAILED(hr)) continue;
break;
default:
--
1.7.1
More information about the wine-patches
mailing list