Don't accept NaN geom sizes.
PiperOrigin-RevId: 542209911 Change-Id: I80f9728e8e624d19783370ba5072f39624c1bbe7
This commit is contained in:
committed by
Copybara-Service
parent
516c5a8bbe
commit
74747e2ae6
@@ -1717,6 +1717,11 @@ void mjCGeom::Compile(void) {
|
||||
size[2] = mjMAX(fabs(aabb[2]), fabs(aabb[5]));
|
||||
}
|
||||
|
||||
for (double s : size) {
|
||||
if (std::isnan(s)) {
|
||||
throw mjCError(this, "nan size in geom '%s' (id = %d)", name.c_str(), id);
|
||||
}
|
||||
}
|
||||
// compute aabb
|
||||
ComputeAABB();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user