diff options
author | Dilith Jayakody <dilithjay@gmail.com> | 2022-06-08 16:04:17 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-06-22 12:02:30 +0300 |
commit | 6b82a2fce2dd0810d06d039ed3c9acfdd079746c (patch) | |
tree | 179a83dfdb3d54f12f0b01da56eecb8890c167d9 | |
parent | 7682e0a697fd1274f78c352038315ea28e9d9e13 (diff) |
Fix T98624: Curve Pen NURBS extrusion creates duplicates
The initial point count check was only being done for Bezier curves.
This revision fixes T98624 by adding the check for NURBS curves as well.
Reviewed By: HooglyBoogly
Maniphest Tasks: T98624
Differential Revision: https://developer.blender.org/D15140
-rw-r--r-- | source/blender/editors/curve/editcurve_pen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c index fca850076ae..91ef73ebf66 100644 --- a/source/blender/editors/curve/editcurve_pen.c +++ b/source/blender/editors/curve/editcurve_pen.c @@ -985,7 +985,7 @@ static void extrude_vertices_from_selected_endpoints(EditNurb *editnurb, else { BPoint *last_bp = nu1->bp + nu1->pntsu - 1; const bool first_sel = nu1->bp->f1 & SELECT; - const bool last_sel = last_bp->f1 & SELECT; + const bool last_sel = last_bp->f1 & SELECT && nu1->pntsu > 1; if (first_sel) { if (last_sel) { BPoint *new_bp = (BPoint *)MEM_mallocN((nu1->pntsu + 2) * sizeof(BPoint), __func__); |