PD: Fix crash in ViewProviderBody::unifyVisualProperty

Make sure that the view provider of a body feature provides the requested property
This commit is contained in:
wmayer
2024-06-18 16:08:44 +02:00
committed by Chris Hennes
parent a36a60d29d
commit 1ccb74f141

View File

@@ -453,8 +453,9 @@ void ViewProviderBody::unifyVisualProperty(const App::Property* prop) {
//copy over the properties data
if (Gui::ViewProvider* vp = gdoc->getViewProvider(feature)) {
auto fprop = vp->getPropertyByName(prop->getName());
fprop->Paste(*prop);
if (auto fprop = vp->getPropertyByName(prop->getName())) {
fprop->Paste(*prop);
}
}
}
}