Fem: Check null shape in constraint bearing

This commit is contained in:
marioalexis
2024-06-27 21:02:14 -03:00
committed by Chris Hennes
parent 2b08586059
commit 966398d497

View File

@@ -84,7 +84,7 @@ void ConstraintBearing::onChanged(const App::Property* prop)
TopoDS_Shape sh = Tools::getFeatureSubShape(feat, subRef.front().c_str(), true);
double radius, height;
Base::Vector3d base, axis;
if (!Tools::getCylinderParams(sh, base, axis, height, radius)) {
if (sh.IsNull() || !Tools::getCylinderParams(sh, base, axis, height, radius)) {
return;
}
Radius.setValue(radius);