Fix uptoshape crash when selecting a face without assigned shape

This commit is contained in:
Florian Foinant-Willig
2024-10-15 21:36:27 +02:00
committed by Chris Hennes
parent 4bd750db82
commit c8a5bdc59d

View File

@@ -397,8 +397,10 @@ void TaskExtrudeParameters::selectedShapeFace(const Gui::SelectionChanges& msg)
}
auto base = static_cast<Part::Feature*>(extrude->UpToShape.getValue());
if (strcmp(msg.pObjectName, base->getNameInDocument()) != 0) {
if (!base){
base = static_cast<Part::Feature*>(extrude);
}
else if (strcmp(msg.pObjectName, base->getNameInDocument()) != 0) {
return;
}