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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to