Nikolay Sivov : d3dcompiler/tests: Do not crash on device creation.
Module: wine Branch: master Commit: f341a693f4caa6804e068142d8850a943beda6a3 URL: https://gitlab.winehq.org/wine/wine/-/commit/f341a693f4caa6804e068142d8850a9... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Nov 18 23:55:33 2023 +0100 d3dcompiler/tests: Do not crash on device creation. Fixes crashes running with a null driver. --- dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c index eed96db7248..a6ecb6a37ee 100644 --- a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c +++ b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c @@ -134,7 +134,11 @@ static IDirect3DDevice9 *create_device(HWND window) HRESULT hr; 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 NULL; + } hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device);
participants (1)
-
Alexandre Julliard