mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
|
|
@ -203,12 +203,11 @@ void RenderPrePassMgr::addElement( RenderInst *inst )
|
|||
matInst = static_cast<MeshRenderInst*>(inst)->matInst;
|
||||
|
||||
// Skip decals if they don't have normal maps.
|
||||
if ( isDecalMeshInst && !matInst->hasNormalMap() )
|
||||
if (!matInst || isDecalMeshInst && !matInst->hasNormalMap())
|
||||
return;
|
||||
|
||||
// If its a custom material and it refracts... skip it.
|
||||
if ( matInst &&
|
||||
matInst->isCustomMaterial() &&
|
||||
if ( matInst->isCustomMaterial() &&
|
||||
static_cast<CustomMaterial*>( matInst->getMaterial() )->mRefract )
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue