mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Merge branch 'edgelord' into 'master'
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue