Assembly: Prevent crash when toggling rigid of grounded sub assembly (#24761)

* Assembly: Prevent crash when toggling rigid of grounded sub assembly

* to squash

* to squash

* Update AssemblyLink.cpp
This commit is contained in:
PaddleStroke
2025-10-21 09:51:15 +02:00
committed by GitHub
parent d97c7cc95c
commit 529aae0238
3 changed files with 31 additions and 0 deletions

View File

@@ -781,6 +781,11 @@ std::unordered_set<App::DocumentObject*> AssemblyObject::getGroundedParts()
if (propObj) {
App::DocumentObject* objToGround = propObj->getValue();
if (objToGround) {
if (auto* asmLink = dynamic_cast<AssemblyLink*>(objToGround)) {
if (!asmLink->isRigid()) {
continue;
}
}
groundedSet.insert(objToGround);
}
}