[Mesa-dev] [PATCH 75/75] st/nine: More checks for GetRenderTargetData

Axel Davy axel.davy at ens.fr
Wed Oct 5 20:09:48 UTC 2016


Fixes a wine test crash

Signed-off-by: Axel Davy <axel.davy at ens.fr>
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
 src/gallium/state_trackers/nine/device9.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 0c9e78b..b8d82be 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1452,6 +1452,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);
 
-- 
2.10.0



More information about the mesa-dev mailing list