[PATCH] d3dx9: Zero constantinfo_reserved on error in get_constants_desc().

Paul Gofman <[email protected]> Fri, 10 Nov 2017 10:33:30 +0300
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
Signed-off-by: Paul Gofman <[email protected]>
---
 dlls/d3dx9_36/preshader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/d3dx9_36/preshader.c b/dlls/d3dx9_36/preshader.c
index e3e91c643b..78e4868940 100644
--- a/dlls/d3dx9_36/preshader.c
+++ b/dlls/d3dx9_36/preshader.c
@@ -539,6 +539,8 @@ static HRESULT get_ctab_constant_desc(ID3DXConstantTable *ctab, D3DXHANDLE hc, D
     if (!constant)
     {
         FIXME("Could not get constant desc.\n");
+        if (constantinfo_reserved)
+            *constantinfo_reserved = 0;
         return D3DERR_INVALIDCALL;
     }
     *desc = constant->desc;
-- 
2.13.6