Skip to content

Commit 4bb41d9

Browse files
committed
fix regression in apparently untested #5981
1 parent 78eb6c0 commit 4bb41d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/processing/core/PGraphics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,10 +1482,10 @@ public void vertex(float x, float y, float z) {
14821482
// http://dev.processing.org/bugs/show_bug.cgi?id=444
14831483
if (shape == POLYGON) {
14841484
if (vertexCount > 0) {
1485+
float[] pvertex = vertices[vertexCount-1];
14851486
if ((Math.abs(pvertex[X] - x) < EPSILON) &&
14861487
(Math.abs(pvertex[Y] - y) < EPSILON) &&
14871488
(Math.abs(pvertex[Z] - z) < EPSILON)) {
1488-
float[] pvertex = vertices[vertexCount-1];
14891489
// this vertex is identical, don't add it,
14901490
// because it will anger the triangulator
14911491
return;

0 commit comments

Comments
 (0)