Throw error if qhull is called with NaNs.
PiperOrigin-RevId: 601745538 Change-Id: I590673ca7975e4abc171f98704a6c8f8d08f8327
This commit is contained in:
committed by
Copybara-Service
parent
076db5d366
commit
fb8f77df74
@@ -1506,6 +1506,10 @@ void mjCMesh::MakeGraph(void) {
|
||||
throw mjCError(this, "could not allocate data for qhull");
|
||||
}
|
||||
for (int i=0; i<3*nvert_; i++) {
|
||||
if (!std::isfinite(vert_[i])) {
|
||||
mju_free(data);
|
||||
throw mjCError(this, "vertex coordinate %d is not finite", NULL, i);
|
||||
}
|
||||
data[i] = (double)vert_[i];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user