[PATCH] d3dcompiler: Check shader for NULL.

Matteo Bruni mbruni at codeweavers.com
Wed Jun 17 10:27:26 CDT 2020


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
I had this local change to 24c84947c835d42190e61b70ee5be98bdedd1e9b
that I forgot to commit and send in place of the simple signoff. Oh
well...

 dlls/d3dcompiler_43/compiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c
index 78fb0c46cc09..c400b83d8d1a 100644
--- a/dlls/d3dcompiler_43/compiler.c
+++ b/dlls/d3dcompiler_43/compiler.c
@@ -805,7 +805,7 @@ static HRESULT compile_shader(const char *preproc_shader, const char *target, co
             if (FAILED(blob_hr = D3DCreateBlob(size, &buffer)))
             {
                 HeapFree(GetProcessHeap(), 0, messages);
-                if (*shader)
+                if (shader && *shader)
                 {
                     ID3D10Blob_Release(*shader);
                     *shader = NULL;
-- 
2.26.2




More information about the wine-devel mailing list