Part: fix check with wrong pointer

This commit is contained in:
wmayer
2023-10-29 15:41:30 +01:00
committed by wwmayer
parent 680c518162
commit 4ade6fbfd5

View File

@@ -686,9 +686,9 @@ void SectionCut::startCutting(bool isInitial)
CutCompoundBF = CreateBooleanFragments(doc);
// the BooleanFragment implementation requires to first add at least 2 objects
// before any other setting to the BooleanFragment object can be made
App::PropertyLinkList* CutLinkList =
dynamic_cast<App::PropertyLinkList*>(CutCompoundBF->getPropertyByName("Objects"));
if (!CutCompoundBF) {
auto CutLinkList = dynamic_cast<App::PropertyLinkList*>(
CutCompoundBF ? CutCompoundBF->getPropertyByName("Objects") : nullptr);
if (!CutLinkList) {
Base::Console().Error((std::string("SectionCut error: ") + std::string(CompoundName)
+ std::string(" could not be added\n")).c_str());
return;