Curve Edit Mode: Fix crash when the U-resolution of the curve is changed

`normal_len` did not follow the value of the loop that is executed to add the vertices, being different from the vbo size
This commit is contained in:
Germano
2018-01-02 23:09:51 -02:00
parent b3c4e30a7c
commit 6c46dff50d

View File

@@ -126,7 +126,7 @@ static int curve_render_normal_len_get(const ListBase *lb, const CurveCache *ob_
nr -= skip;
}
#else
normal_len += max_ii((nr + max_ii(skip - 1, 0)) / (skip + 1), 0);
normal_len += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0);
#endif
}
return normal_len;