[TD]fix fail on section delete

- fails in onChange during delete due to null BaseView
This commit is contained in:
wandererfan
2023-09-10 08:50:29 -04:00
committed by WandererFan
parent 857ddacb6e
commit be74909b9a

View File

@@ -319,7 +319,7 @@ void DrawViewSection::onChanged(const App::Property* prop)
else if (prop == &BaseView) {
// if the BaseView is a Section, then the option of using UsePreviousCut is
// valid.
if (BaseView.getValue()->getTypeId().isDerivedFrom(
if (BaseView.getValue() && BaseView.getValue()->getTypeId().isDerivedFrom(
TechDraw::DrawViewSection::getClassTypeId())) {
UsePreviousCut.setStatus(App::Property::ReadOnly, false);
}