fix recently introduced crashing bug in MJCF reader
due to https://github.com/bulletphysics/bullet3/pull/1484 (Issue 1484)
This commit is contained in:
1 parent
36c258fd3d
commit
4743d2770a
1 file changed
+1
-1
@@ -251,7 +251,7 @@ struct BulletMJCFImporterInternalData
|
|||||||
const char* angle = root_xml->Attribute("angle");
|
const char* angle = root_xml->Attribute("angle");
|
||||||
m_angleUnits = angle ? angle : "degree"; // degrees by default, http://www.mujoco.org/book/modeling.html#compiler
|
m_angleUnits = angle ? angle : "degree"; // degrees by default, http://www.mujoco.org/book/modeling.html#compiler
|
||||||
const char* inertiaFromGeom = root_xml->Attribute("inertiafromgeom");
|
const char* inertiaFromGeom = root_xml->Attribute("inertiafromgeom");
|
||||||
if(inertiaFromGeom[0] == 'f') // false, other values assumed `true`.
|
if(inertiaFromGeom && inertiaFromGeom[0] == 'f') // false, other values assumed `true`.
|
||||||
{
|
{
|
||||||
m_inertiaFromGeom = false;
|
m_inertiaFromGeom = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user