From 1b6e8b9f09cc7ef500eb535706faf8d7fa831349 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 14 May 2020 14:20:55 +0300 Subject: [PATCH] 0031565: Visualization - SIGFPE, Arithmetic exception if SelectMgr_TriangularFrustumSet::Build() is called with single point --- src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 78a5d72654..a03381e922 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -45,7 +45,7 @@ void SelectMgr_TriangularFrustumSet::Build (const TColgp_Array1OfPnt2d& thePoint Handle(BRepMesh_DataStructureOfDelaun) aMeshStructure = new BRepMesh_DataStructureOfDelaun (anAllocator); Standard_Integer aPtsLower = thePoints.Lower(); Standard_Integer aPtsUpper = thePoints.Upper(); - IMeshData::VectorOfInteger anIndexes(aPtsUpper - aPtsLower, anAllocator); + IMeshData::VectorOfInteger anIndexes (thePoints.Size(), anAllocator); myBoundaryPoints.Resize (aPtsLower, aPtsLower + 2 * (thePoints.Size()) - 1, Standard_False); for (Standard_Integer aPtIdx = aPtsLower; aPtIdx <= aPtsUpper; ++aPtIdx)