diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx index 6d6d1ebc8b..44822a68f8 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx @@ -152,7 +152,10 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertice (const Standard_Integer th aVec.y() = theY; aVec.z() = theZ; - myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); + if (myAttribs->NbElements < theIndex) + { + myAttribs->NbElements = theIndex; + } } inline void Graphic3d_ArrayOfPrimitives::SetVertexColor (const Standard_Integer theIndex,