1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Don't add empty primitive sets to geometry.

This commit is contained in:
Nelsson Huotari 2019-05-09 21:26:34 +03:00
parent 3becacf6d1
commit 780055899d

View File

@ -127,7 +127,7 @@ void CSVRender::TerrainSelection::update()
mGeometry->setVertexArray(vertices);
osg::ref_ptr<osg::DrawArrays> drawArrays = new osg::DrawArrays(osg::PrimitiveSet::LINES);
drawArrays->setCount(vertices->size());
mGeometry->addPrimitiveSet(drawArrays);
if (vertices->size() != 0) mGeometry->addPrimitiveSet(drawArrays);
mSelectionNode->addChild(mGeometry);
}