TechDraw: Fix #10919 crash at geometry deletion

This commit is contained in:
Florian Foinant-Willig
2023-10-03 14:19:25 +02:00
committed by WandererFan
parent 826194e0bc
commit c214ca3dd9

View File

@@ -113,7 +113,9 @@ Part::TopoShape ReferenceEntry::asTopoShape() const
{
// Base::Console().Message("RE::asTopoShape()\n");
TopoDS_Shape geom = getGeometry();
if (geom.IsNull()) {
throw Base::RuntimeError("Dimension Reference has null geometry");
}
if (geom.ShapeType() == TopAbs_VERTEX) {
TopoDS_Vertex vert = TopoDS::Vertex(geom);
return asTopoShapeVertex(vert);