diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-11 06:18:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-11 06:18:27 +0400 |
commit | a0ae47f06c6232a91202bd06ea173b955735596b (patch) | |
tree | d0c928e2167037eec5f01277ebe7dc0885168d59 /source/blender/blenkernel/intern/fcurve.c | |
parent | 652f64762c31bd1cfcac7ae05f184b70713b2034 (diff) |
add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index b78ab9b28cd..5fea74d52de 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -74,12 +74,10 @@ void free_fcurve(FCurve *fcu) { if (fcu == NULL) return; - + /* free curve data */ - if (fcu) { - if (fcu->bezt) MEM_freeN(fcu->bezt); - if (fcu->fpt) MEM_freeN(fcu->fpt); - } + if (fcu->bezt) MEM_freeN(fcu->bezt); + if (fcu->fpt) MEM_freeN(fcu->fpt); /* free RNA-path, as this were allocated when getting the path string */ if (fcu->rna_path) |