mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-13 08:58:35 +00:00
Merge branch 'edgelord' into 'master'
Fix UB when pathgrid geometry is generated and all pathgrid edges are invalid See merge request OpenMW/openmw!4541
This commit is contained in:
commit
6ede5635b3
@ -126,9 +126,9 @@ namespace SceneUtil
|
||||
|
||||
gridGeometry->setVertexArray(vertices);
|
||||
gridGeometry->setColorArray(colors, osg::Array::BIND_PER_VERTEX);
|
||||
if (pointIndexCount)
|
||||
if (!pointIndices->empty())
|
||||
gridGeometry->addPrimitiveSet(pointIndices);
|
||||
if (edgeIndexCount)
|
||||
if (!lineIndices->empty())
|
||||
gridGeometry->addPrimitiveSet(lineIndices);
|
||||
gridGeometry->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user