Cycles: Fix wrong vector allocation in the mesh sync code

This commit is contained in:
Lukas Stockner 2017-03-21 04:30:08 +01:00
parent 8fff6cc2f5
commit eb1a57b12c
1 changed files with 1 additions and 1 deletions

View File

@ -819,7 +819,7 @@ static void create_mesh(Scene *scene,
int shader = clamp(p->material_index(), 0, used_shaders.size()-1);
bool smooth = p->use_smooth() || use_loop_normals;
vi.reserve(n);
vi.resize(n);
for(int i = 0; i < n; i++) {
/* NOTE: Autosmooth is already taken care about. */
vi[i] = b_mesh.loops[p->loop_start() + i].vertex_index();