Unity plug-in: Fix for when xml file has no <compiler> section.
PiperOrigin-RevId: 598646137 Change-Id: Id27635dc3064f8568ae0d86c2cdee8c2d414dd2f
This commit is contained in:
committed by
Copybara-Service
parent
c77f984d9b
commit
2388b651e8
@@ -166,7 +166,7 @@ namespace Mujoco {
|
||||
FrictionLoss = mjcf.GetFloatAttribute("frictionloss", 0.0f);
|
||||
|
||||
bool defaultLimited = false;
|
||||
if ((mjcf.OwnerDocument.GetElementsByTagName("compiler") [0]["compiler"])
|
||||
if ((mjcf.OwnerDocument.GetElementsByTagName("compiler")[0]?["compiler"])
|
||||
?.GetBoolAttribute("autolimits", true) ??
|
||||
true) {
|
||||
defaultLimited = mjcf.HasAttribute("range");
|
||||
|
||||
Reference in New Issue
Block a user