From e5fee1619851d90d8125a5705e100a8021d5e78e Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 15 Oct 2020 15:29:41 +0300 Subject: [PATCH] bos #20207: EDF 22171 - Sigsegv with automatic coincidence --- src/PartSet/PartSet_WidgetPoint2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index fa0c5ede7..8f6f4fcd5 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -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(); GeomPnt2dPtr aPnt = PartSet_Tools::getPnt2d(aView, aTDShape, mySketch); aX = aPnt->x(); -- 2.39.2