`BKE_mesh_nomain_to_mesh` expects the object's data to be the mesh. Also, the curve to mesh conversion can return a null pointer, so use an empty mesh in that case. Thanks to Falk David for finding these.
`BKE_mesh_nomain_to_mesh` expects the object's data to be the mesh. Also, the curve to mesh conversion can return a null pointer, so use an empty mesh in that case. Thanks to Falk David for finding these.