diff options
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 06d88b16fa8..8b9477adf92 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6544,12 +6544,15 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob) BLI_assert(!"invalid nurbs type"); return NULL; } - - /* always do: */ - nu->flag |= CU_SMOOTH; - - test2DNurb(nu); - + + BLI_assert(nu != NULL); + + if(nu) { /* should always be set */ + nu->flag |= CU_SMOOTH; + + test2DNurb(nu); + } + return nu; } |