1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:45:34 +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);
}