st/nine: More checks for GetRenderTargetData
authorAxel Davy <axel.davy@ens.fr>
Sun, 2 Oct 2016 10:14:03 +0000 (12:14 +0200)
committerAxel Davy <axel.davy@ens.fr>
Mon, 10 Oct 2016 21:43:51 +0000 (23:43 +0200)
Fixes a wine test crash

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/device9.c

index b094edeb87d948b2b9bdfea80388da1b66caf4b5..c0a3c3937fba1f22aa6ec3399ad8fdc8b1dc9114 100644 (file)
@@ -1455,6 +1455,8 @@ NineDevice9_GetRenderTargetData( struct NineDevice9 *This,
     DBG("This=%p pRenderTarget=%p pDestSurface=%p\n",
         This, pRenderTarget, pDestSurface);
 
+    user_assert(pRenderTarget && pDestSurface, D3DERR_INVALIDCALL);
+
     user_assert(dst->desc.Pool == D3DPOOL_SYSTEMMEM, D3DERR_INVALIDCALL);
     user_assert(src->desc.Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);