95f05402f1
needhull_ was only set while iterating geoms, so a mesh whose inertia is computed from its convex hull never got one unless some geom pointed at it. mjCMesh::ComputeVolume and ComputeInertia then read graph_[1] and GraphFaces() off a null pointer and the compiler crashed. Whether a mesh needs its hull for inertia is a property of the mesh, not of any geom, so move that condition out of the geom loop and apply it to every mesh. Fixes #3431