[PATCH] d3d11/test: Stop crash when CreateBlendState fails

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Fri Nov 20 00:51:15 CST 2015


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/d3d11/tests/d3d11.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index f42edf7..95ba8c0 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -2139,6 +2139,11 @@ static void test_create_blend_state(void)
 
         hr = ID3D11Device_CreateBlendState(device, current_desc, &blend_state1);
         ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+        if (FAILED(hr))
+        {
+            win_skip("Failed to create CreateBlendState, skipping test %u.\n", i);
+            continue;
+        }
 
         hr = ID3D11BlendState_QueryInterface(blend_state1, &IID_ID3D10BlendState, (void **)&d3d10_blend_state);
         ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
-- 
1.9.1




More information about the wine-patches mailing list