From: azv Date: Mon, 27 Jan 2020 13:56:28 +0000 (+0300) Subject: Fix crash on the selection of external object when creating B-spline X-Git-Tag: V9_5_0a1~54^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66f7148ba1f2acff0982136bff839b7074519188;p=modules%2Fshaper.git Fix crash on the selection of external object when creating B-spline --- 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