Issue found by PVS Studio:

Several instances where we utilize a pointer variable without properly testing that they aren't null first.
This commit is contained in:
Areloch 2015-07-28 23:19:59 -05:00
parent b24bdfbc8b
commit 3a18819e1e
9 changed files with 44 additions and 37 deletions

View file

@ -66,7 +66,7 @@ void GFXPCD3D9Device::createDirect3D9(LPDIRECT3D9 &d3d9, LPDIRECT3D9EX &d3d9ex)
if (pfnCreate9Ex)
{
if (!FAILED(pfnCreate9Ex(D3D_SDK_VERSION, &d3d9ex)) && d3d9ex)
if (d3d9ex && !FAILED(pfnCreate9Ex(D3D_SDK_VERSION, &d3d9ex)))
d3d9ex->QueryInterface(__uuidof(IDirect3D9), reinterpret_cast<void **>(&d3d9));
}