Commit f341a693 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3dcompiler/tests: Do not crash on device creation.

Fixes crashes running with a null driver.
parent 1e1d18a4
...@@ -134,7 +134,11 @@ static IDirect3DDevice9 *create_device(HWND window) ...@@ -134,7 +134,11 @@ static IDirect3DDevice9 *create_device(HWND window)
HRESULT hr; HRESULT hr;
d3d = Direct3DCreate9(D3D_SDK_VERSION); 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, hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device); D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment