Module: wine Branch: master Commit: c944db5fc049bc6284b9619e487bc2ccd06f49bd URL: https://gitlab.winehq.org/wine/wine/-/commit/c944db5fc049bc6284b9619e487bc2c...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Fri Nov 24 21:52:49 2023 +0100
d3dx9/tests: Fix a crash when d3d9 object can't be created.
---
dlls/d3dx9_36/tests/math.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 409fa2c7dcb..3345c412481 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -4480,9 +4480,14 @@ static void test_D3DXSHProjectCubeMap(void) {-1.10743945e+3f, -9.43649292e+2f, 5.48424316e+2f, 1.65352710e+3f}}, };
- window = create_window(); d3d = Direct3DCreate9(D3D_SDK_VERSION); - ok(!!d3d, "Failed to create a D3D object.\n"); + if (!d3d) + { + skip("Failed to create a D3D object.\n"); + return; + } + + window = create_window(); if (!(device = create_device(d3d, window))) { skip("Failed to create a D3D device, skipping tests.\n");