fix for crash in own commit r51773. drawing VBO's used the wrong origindex.

This commit is contained in:
Campbell Barton 2012-10-31 11:05:32 +00:00
parent 00b8c2afa1
commit c85488ff9e

@ -938,7 +938,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
if (i != tottri - 1) if (i != tottri - 1)
next_actualFace = dm->drawObject->triangle_to_mface[i + 1]; next_actualFace = dm->drawObject->triangle_to_mface[i + 1];
orig = (index_mf_to_mpoly) ? DM_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, i) : i; orig = (index_mf_to_mpoly) ? DM_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, actualFace) : actualFace;
if (orig == ORIGINDEX_NONE) if (orig == ORIGINDEX_NONE)
draw_option = setMaterial(mface->mat_nr + 1, NULL); draw_option = setMaterial(mface->mat_nr + 1, NULL);