diff --git a/src/Mod/Assembly/App/AssemblyObject.cpp b/src/Mod/Assembly/App/AssemblyObject.cpp index dead9a8c65..96b514166d 100644 --- a/src/Mod/Assembly/App/AssemblyObject.cpp +++ b/src/Mod/Assembly/App/AssemblyObject.cpp @@ -1072,6 +1072,12 @@ std::string AssemblyObject::handleOneSideOfJoint(App::DocumentObject* joint, App::DocumentObject* part = getLinkObjFromProp(joint, propPartName); App::DocumentObject* obj = getObjFromNameProp(joint, propObjName, propPartName); + if (!part) { + std::string msg = std::string("The property ") + propPartName + " of Joint " + + joint->getFullName() + " is empty.\n"; + THROWM(Base::ValueError, msg); + } + std::shared_ptr mbdPart = getMbDPart(part); Base::Placement plc = getPlacementFromProp(joint, propPlcName); // Now we have plc which is the JCS placement, but its relative to the Object, not to the