[Bf-blender-cvs] [f5cb8da8163] soc-2021-curves: Check if bezt exists before moving adjacent handles

Dilith Jayakody noreply at git.blender.org
Sat Jan 8 04:05:23 CET 2022


Commit: f5cb8da816395c4361482e670e0aa95aeb8fb04d
Author: Dilith Jayakody
Date:   Wed Jan 5 19:41:53 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rBf5cb8da816395c4361482e670e0aa95aeb8fb04d

Check if bezt exists before moving adjacent handles

===================================================================

M	source/blender/editors/curve/editcurve_pen.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index c988de11ce4..384613cfc6e 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -1144,6 +1144,10 @@ static void move_adjacent_handle(ViewContext *vc, const wmEvent *event)
   BPoint *bp;
   get_selected_points(vc->obedit->data, vc->v3d, &nu, &bezt, &bp);
 
+  if (!bezt) {
+    return;
+  }
+
   /* Get the adjacent `BezTriple` */
   BezTriple *adj_bezt = BKE_nurb_bezt_get_prev(nu, bezt);
   int cp_index = 2;



More information about the Bf-blender-cvs mailing list