From 1ccb74f141ec4d1276b39d18fb99f276d09e007e Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 18 Jun 2024 16:08:44 +0200 Subject: [PATCH] PD: Fix crash in ViewProviderBody::unifyVisualProperty Make sure that the view provider of a body feature provides the requested property --- src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 3e3a3b6f39..aa78a19e97 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -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); + } } } }