mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 21:35:04 +02:00
avoid div by zero
This commit is contained in:
parent
8a9f3b9508
commit
766a5c7f81
1 changed files with 3 additions and 0 deletions
|
@ -177,6 +177,9 @@ void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer&
|
||||||
|
|
||||||
void PolyLineEntityRenderer::updateGeometry() {
|
void PolyLineEntityRenderer::updateGeometry() {
|
||||||
int maxNumVertices = std::min(_points.length(), _normals.length());
|
int maxNumVertices = std::min(_points.length(), _normals.length());
|
||||||
|
if (maxNumVertices < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
bool doesStrokeWidthVary = false;
|
bool doesStrokeWidthVary = false;
|
||||||
if (_widths.size() > 0) {
|
if (_widths.size() > 0) {
|
||||||
float prevWidth = _widths[0];
|
float prevWidth = _widths[0];
|
||||||
|
|
Loading…
Reference in a new issue