Update all references after attaching a plugin with multiple references.
PiperOrigin-RevId: 783784916 Change-Id: I11da14f11f9206b466bce424979264659bf9a819
This commit is contained in:
committed by
Copybara-Service
parent
3cc8d7f58a
commit
bca5d0c671
@@ -394,6 +394,14 @@ void mjCModel::CopyPlugin(const std::vector<mjCPlugin*>& source,
|
|||||||
delete candidate;
|
delete candidate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update other elements in the list in case of multiple references
|
||||||
|
for (auto& element : list) {
|
||||||
|
if (!element->plugin_instance_name.empty()) {
|
||||||
|
element->spec.plugin.element =
|
||||||
|
instances.at(element->plugin_instance_name)->spec.plugin.element;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user