Fix #130110: Fill tool crashes when extension lines are enabled
This was caused by ba28469e, which subtracted the start of the
offsets array, so it can't be used for "max array size" any more.
Use the "last()" entry directly to correctly size the view
positions array.
Pull Request: https://projects.blender.org/blender/blender/pulls/130127
This commit is contained in:
@@ -712,7 +712,7 @@ static void grease_pencil_fill_extension_cut(const bContext &C,
|
||||
|
||||
/* Upper bound for segment count. Arrays are sized for easy index mapping, exact count isn't
|
||||
* necessary. Not all entries are added to the BVH tree. */
|
||||
const int max_bvh_lines = bvh_curve_offsets.total_size();
|
||||
const int max_bvh_lines = bvh_curve_offsets.data().last();
|
||||
/* Cached view positions for lines. */
|
||||
Array<float2> view_starts(max_bvh_lines);
|
||||
Array<float2> view_ends(max_bvh_lines);
|
||||
|
||||
Reference in New Issue
Block a user