diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-06 06:59:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-06 07:24:16 +0300 |
commit | bc97d7832906318a1185b3fb460b1d8d89020ba0 (patch) | |
tree | 096969472b2a5ad82c56d8f616cd398f47840bdf /source/blender/editors/curve | |
parent | 99738fbfdc8b4639d95c796bcc8711bd89c1aaa4 (diff) |
Cleanup: use MEM_SAFE_FREE macro
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index e7d97ce343c..c399abfa52d 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1848,10 +1848,7 @@ static void ed_surf_delete_selected(Object *obedit) nu->pntsv = 1; SWAP(short, nu->orderu, nu->orderv); BKE_nurb_order_clamp_u(nu); - if (nu->knotsv) { - MEM_freeN(nu->knotsv); - } - nu->knotsv = NULL; + MEM_SAFE_FREE(nu->knotsv); } else { nu->pntsu = newu; @@ -4650,10 +4647,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) /* now join the knots */ if (nu1->type == CU_NURBS) { - if (nu1->knotsu != NULL) { - MEM_freeN(nu1->knotsu); - nu1->knotsu = NULL; - } + MEM_SAFE_FREE(nu1->knotsu); BKE_nurb_knot_calc_u(nu1); } |