-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
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();