Bug in sweet_geometry_subdivide_mesh_vt

This commit is contained in:
Luc Girod 2014-05-05 03:26:16 +02:00
parent 4a21eeaa82
commit 83d615565b

View File

@ -397,7 +397,7 @@ sweet_geometry_subdivide_mesh_vt (unsigned int nb_iterations, float scale,
(*mesh_indices) = malloc (nb_faces * 3 * sizeof (unsigned int)); (*mesh_indices) = malloc (nb_faces * 3 * sizeof (unsigned int));
(*mesh_vertices) = malloc (v.nb_vertices * sizeof (float) * 3); (*mesh_vertices) = malloc (v.nb_vertices * sizeof (float) * 3);
(*mesh_tcoord) = malloc ((*count_vertices) * sizeof (float) * 2); (*mesh_tcoord) = malloc (t.nb_uv * sizeof (float) * 2);
if ((*mesh_indices) == NULL || (*mesh_vertices) == NULL || (*mesh_tcoord) == NULL) if ((*mesh_indices) == NULL || (*mesh_vertices) == NULL || (*mesh_tcoord) == NULL)
{ {