]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
bos #20207: EDF 22171 - Sigsegv with automatic coincidence
authorvsv <vsv@opencascade.com>
Thu, 15 Oct 2020 12:29:41 +0000 (15:29 +0300)
committervsv <vsv@opencascade.com>
Thu, 15 Oct 2020 12:29:41 +0000 (15:29 +0300)
src/PartSet/PartSet_WidgetPoint2d.cpp

index fa0c5ede783da598aeeda0f8c80e53dc5889d857..8f6f4fcd5f15f096f1ee50419fa60715bb380477 100644 (file)
@@ -561,7 +561,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
   bool aHasPoint = false;
   if (aFirstValue.get()) {
     GeomShapePtr aShape = aFirstValue->shape();
-    if (aShape->shapeType() == GeomAPI_Shape::VERTEX) {
+    if (aShape.get() && aShape->shapeType() == GeomAPI_Shape::VERTEX) {
       const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
       GeomPnt2dPtr aPnt = PartSet_Tools::getPnt2d(aView, aTDShape, mySketch);
       aX = aPnt->x();