From 66f7148ba1f2acff0982136bff839b7074519188 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 27 Jan 2020 16:56:28 +0300 Subject: [PATCH] Fix crash on the selection of external object when creating B-spline --- src/PartSet/PartSet_WidgetBSplinePoints.cpp | 6 +----- src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/PartSet/PartSet_WidgetBSplinePoints.cpp b/src/PartSet/PartSet_WidgetBSplinePoints.cpp index 5ccc381e1..0678e8277 100644 --- a/src/PartSet/PartSet_WidgetBSplinePoints.cpp +++ b/src/PartSet/PartSet_WidgetBSplinePoints.cpp @@ -533,11 +533,7 @@ void PartSet_WidgetBSplinePoints::mouseReleased(ModuleBase_IViewWindow* theWindo } GeomPnt2dPtr aSelectedPoint = PartSet_Tools::getPnt2d(aView, aSelectedShape, mySketch); - if (aSelectedPoint) { - // nullify selected object to add reference to attribute instead of its owner - aSelectedObject = ObjectPtr(); - } - else { + if (!aSelectedPoint) { aSelectedPoint = PartSet_Tools::getPnt2d(theEvent, theWindow, mySketch); setValueState(Stored); // in case of edge selection, Apply state should also be updated } diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 2605ddf93..7f936524c 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -576,8 +576,8 @@ double* PlaneGCSSolver_Storage::createParameter() void PlaneGCSSolver_Storage::removeParameters(const GCS::SET_pD& theParams) { mySketchSolver->removeParameters(theParams); - for (GCS::SET_pD::iterator it = theParams.begin(); it != theParams.end(); ++it) - delete *it; + //for (GCS::SET_pD::iterator it = theParams.begin(); it != theParams.end(); ++it) + // delete *it; } // indicates attribute containing in the external feature -- 2.39.2