diff --git a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp index 02da50f264..7479ed452a 100644 --- a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp @@ -287,6 +287,9 @@ std::vector TaskFeaturePick::buildFeatures() App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::string sub, bool independent) { App::DocumentObject* copy = nullptr; + // Check for null to avoid segfault + if (!obj) + return copy; if( independent && (obj->isDerivedFrom(Sketcher::SketchObject::getClassTypeId()) || obj->isDerivedFrom(PartDesign::FeaturePrimitive::getClassTypeId()))) {