Skip to content

Commit

Permalink
[MeshLodGenerator] fixed crash for normal-less meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Aug 29, 2024
1 parent d20e07d commit 10f4d42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace Ogre
const v1::VertexElement *elemNormal =
vertexData->vertexDeclaration->findElementBySemantic( VES_NORMAL );

const bool bNormalIsQTangent = elemNormal->getType() == VET_SHORT4_SNORM;
const bool bNormalIsQTangent = elemNormal && elemNormal->getType() == VET_SHORT4_SNORM;

data->mUseVertexNormals &= ( elemNormal != NULL );
if( data->mUseVertexNormals )
Expand Down

0 comments on commit 10f4d42

Please sign in to comment.