[D3D9Ex] Make sure the creation succeeded

This commit is contained in:
momo5502 2017-06-23 10:05:05 +02:00
parent 47c8fcc644
commit 424c7e7adf

View File

@ -733,8 +733,9 @@ namespace Components
{
if (Dvar::Var("r_useD3D9Ex").get<bool>())
{
IDirect3D9Ex* test;
Direct3DCreate9Ex(sdk, &test);
IDirect3D9Ex* test = nullptr;
if (FAILED(Direct3DCreate9Ex(sdk, &test))) return nullptr;
return (new D3D9Ex::D3D9(test));
}
else