Skip to content

Commit

Permalink
PD: Fix crash in ViewProviderBody::unifyVisualProperty
Browse files Browse the repository at this point in the history
Make sure that the view provider of a body feature provides the requested property
  • Loading branch information
wwmayer committed Jun 18, 2024
1 parent 27c61ef commit 2a81c09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/PartDesign/Gui/ViewProviderBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 2a81c09

Please sign in to comment.