diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-30 13:24:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-30 13:24:10 +0400 |
commit | f66ec41b6a3b74f079c19494357c268e1ab39e85 (patch) | |
tree | dab6b2a879fc31ad1ae8a2e187679646b9d01a18 /source/blender/editors/curve | |
parent | 6a27da310c61b3372d565060506221a5afb9fe43 (diff) |
quiet some compiler warnings & fix possible (but unlikely) crash.
also added GPLv2+ header to resources.c.
Diffstat (limited to 'source/blender/editors/curve')
-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; } |