Sketcher: Assertion on solver bspline control point creation to expose any potential index miscalculation and memory overflow

This commit is contained in:
Abdullah Tahiri
2017-03-17 14:23:01 +01:00
committed by wmayer
parent debff30d92
commit d96c8421d4

View File

@@ -2474,6 +2474,8 @@ int Sketch::addInternalAlignmentBSplineControlPoint(int geoId1, int geoId2, int
GCS::Circle &c = Circles[Geoms[geoId2].index];
GCS::BSpline &b = BSplines[Geoms[geoId1].index];
assert( poleindex < b.poles.size() && poleindex >= 0 );
int tag = ++ConstraintsCounter;
GCSsys.addConstraintInternalAlignmentBSplineControlPoint(b, c, poleindex, tag);