Throw an error if a child attached by reference to a parent is compiled.
Fixes #2482. PiperOrigin-RevId: 735665098 Change-Id: Ia3436fdd2ff572f8f0c1ded434742a4a9186f2f7
This commit is contained in:
committed by
Copybara-Service
parent
14dc6fd33b
commit
019e0a806c
@@ -941,6 +941,7 @@ mjCBody& mjCBody::operator+=(const mjCFrame& other) {
|
||||
}
|
||||
|
||||
// attach referencing elements
|
||||
other_model->SetAttached(model->deepcopy_);
|
||||
*model += *other_model;
|
||||
|
||||
// leave the source model in a clean state
|
||||
@@ -1947,6 +1948,7 @@ mjCFrame& mjCFrame::operator+=(const mjCBody& other) {
|
||||
last_attached = &body->bodies.back()->spec;
|
||||
|
||||
// attach referencing elements
|
||||
other_model->SetAttached(model->deepcopy_);
|
||||
*model += *other_model;
|
||||
|
||||
// leave the source model in a clean state
|
||||
|
||||
Reference in New Issue
Block a user