Salome HOME
Adding test for bos #41748 [CEA] Issue in interpolation edition
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2d.cpp
index ab8f1791cbc4b4604acfc189621970fa94a3a2fe..e434c3d0f2de57cf0fc9aa2f200992bcad941500 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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() == TopAbs_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();