Return 0 on success from mjs_activatePlugin instead of using mju_error.
PiperOrigin-RevId: 684102823 Change-Id: I86b7702094ae886539e1dfb6294381952d507bc1
This commit is contained in:
committed by
Copybara-Service
parent
5dcc31a6aa
commit
a26ba2012e
@@ -2890,7 +2890,9 @@ void mjXReader::Extension(XMLElement* section) {
|
||||
if (name == "plugin") {
|
||||
string plugin_name;
|
||||
ReadAttrTxt(elem, "plugin", plugin_name, /* required = */ true);
|
||||
mjs_activatePlugin(spec, plugin_name.c_str());
|
||||
if (mjs_activatePlugin(spec, plugin_name.c_str())) {
|
||||
throw mjXError(elem, "plugin %s not found", plugin_name.c_str());
|
||||
}
|
||||
|
||||
XMLElement* child = FirstChildElement(elem);
|
||||
while (child) {
|
||||
|
||||
Reference in New Issue
Block a user