From 4ade6fbfd58f9f394a2e6a3b8384572223d7151b Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 29 Oct 2023 15:41:30 +0100 Subject: [PATCH] Part: fix check with wrong pointer --- src/Mod/Part/Gui/SectionCutting.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index ddf2c15b7d..6f836cbdc9 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -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(CutCompoundBF->getPropertyByName("Objects")); - if (!CutCompoundBF) { + auto CutLinkList = dynamic_cast( + 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;