mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
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:
parent
b24bdfbc8b
commit
3a18819e1e
9 changed files with 44 additions and 37 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue