PD: handle null pointer in Feature::getBaseShape (#12385)
This commit is contained in:
committed by
GitHub
parent
d89f4d7f29
commit
74c52c9063
@@ -156,6 +156,9 @@ Part::Feature* Feature::getBaseObject(bool silent) const {
|
||||
const TopoDS_Shape& Feature::getBaseShape() const {
|
||||
const Part::Feature* BaseObject = getBaseObject();
|
||||
|
||||
if (!BaseObject)
|
||||
throw Base::ValueError("Base feature's shape is not defined");
|
||||
|
||||
if (BaseObject->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId())||
|
||||
BaseObject->isDerivedFrom(PartDesign::SubShapeBinder::getClassTypeId()))
|
||||
{
|
||||
|
||||
@@ -328,4 +328,3 @@ TEST(Vector, TestAngleOriented)
|
||||
}
|
||||
|
||||
// NOLINTEND
|
||||
|
||||
|
||||
Reference in New Issue
Block a user