Salome HOME
Prevent crash on sketcher plane change
authorvsv <vsv@opencascade.com>
Mon, 17 Jun 2019 15:28:12 +0000 (18:28 +0300)
committervsv <vsv@opencascade.com>
Mon, 17 Jun 2019 15:28:12 +0000 (18:28 +0300)
src/SketcherPrs/SketcherPrs_PositionMgr.cpp

index d98ffa0ac766fa1dc54d7ddf7629e8c1a4c06b30..0a546233d9b33060c9ba1257475d3cd95622f06d 100644 (file)
@@ -361,6 +361,8 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
   double theStep, GeomPointPtr thePnt)
 {
   gp_Pnt aP = thePnt->impl<gp_Pnt>();
+  if (!thePrs->plane().get())
+    return aP;
   GeomDirPtr aNormal = thePrs->plane()->normal();
   gp_Dir aNormDir = aNormal->impl<gp_Dir>();