From 5c9bffb73d56287c4d4db4b28d161114a02c40bc Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Feb 2022 17:16:59 +0100 Subject: [PATCH] PD: fix 'stack-use-after-scope' crash --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index e824697aae..aa26f88c0c 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -776,7 +776,7 @@ bool ProfileBased::checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& f BRepAdaptor_Curve adapt(edge); // create a plane (pnt,dir) that goes through the intersection point and is built of // the vectors of the sketch normal and the rotation axis - const gp_Dir& normal = BRepAdaptor_Surface(face).Plane().Axis().Direction(); + gp_Dir normal = BRepAdaptor_Surface(face).Plane().Axis().Direction(); gp_Dir dir = line.Direction().Crossed(normal); gp_Pnt pnt = distss.PointOnShape1(i); @@ -803,7 +803,7 @@ bool ProfileBased::checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& f // create a plane (pnt,dir) that goes through the intersection point and is built of // the vectors of the sketch normal and the rotation axis BRepAdaptor_Surface adapt(face); - const gp_Dir& normal = adapt.Plane().Axis().Direction(); + gp_Dir normal = adapt.Plane().Axis().Direction(); gp_Dir dir = line.Direction().Crossed(normal); gp_Pnt pnt = distss.PointOnShape1(i);