Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-05-09 16:51:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-09 16:51:42 +0300
commit5ae448735123f149c391d8245d33190669a21a94 (patch)
tree4f30ef2b78a160d37c117ba9c2ac4751205f6f4f /source/blender/editors/gpencil
parent6172bdbde86642dbbfdc3c119de6eaf7db7e5993 (diff)
Missed last commit
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index c364f89dc9f..0329598d711 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -399,20 +399,13 @@ static void gp_triangulate_stroke_fill(bGPDstroke *gps)
gps->triangles = MEM_recallocN(gps->triangles, sizeof(*gps->triangles) * gps->tot_triangles);
}
- int triangle_index = 0;
int i;
- for (i = 0; (i < gps->totpoints) && (triangle_index < gps->tot_triangles); i++) {
- if ((tmp_triangles[i][0] >= 0) && (tmp_triangles[i][0] < gps->totpoints) &&
- (tmp_triangles[i][1] >= 0) && (tmp_triangles[i][1] < gps->totpoints) &&
- (tmp_triangles[i][2] >= 0) && (tmp_triangles[i][2] < gps->totpoints))
- {
- bGPDtriangle *stroke_triangle = &gps->triangles[triangle_index++];
-
- stroke_triangle->v1 = tmp_triangles[i][0];
- stroke_triangle->v2 = tmp_triangles[i][1];
- stroke_triangle->v3 = tmp_triangles[i][2];
- }
+ for (i = 0; i < gps->tot_triangles; i++) {
+ bGPDtriangle *stroke_triangle = &gps->triangles[i];
+ stroke_triangle->v1 = tmp_triangles[i][0];
+ stroke_triangle->v2 = tmp_triangles[i][1];
+ stroke_triangle->v3 = tmp_triangles[i][2];
}
}
else {