From 993a8a858380e2e17eb062a20d807c5cd4d25608 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 1 Sep 2015 19:39:34 +0200 Subject: [PATCH] + fix build failure in debug build type --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 293db3224..c3859ec2b 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1168,13 +1168,20 @@ void ViewProviderSketch::moveConstraint(int constNum, const Base::Vector2D &toPo const std::vector &constrlist = getSketchObject()->Constraints.getValues(); Constraint *Constr = constrlist[constNum]; - + +#ifdef _DEBUG + int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1; + int extGeoCount = getSketchObject()->getExternalGeometryCount(); +#endif + // with memory allocation const std::vector geomlist = getSketchObject()->getSolvedSketch().extractGeometry(true, true); +#ifdef _DEBUG assert(int(geomlist.size()) == extGeoCount + intGeoCount); assert((Constr->First >= -extGeoCount && Constr->First < intGeoCount) || Constr->First != Constraint::GeoUndef); +#endif if (Constr->Type == Distance || Constr->Type == DistanceX || Constr->Type == DistanceY || Constr->Type == Radius) {