diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-14 01:41:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-14 01:41:15 +0300 |
commit | 2de497eee0aed6bf1444e494a3871ec0e0d728db (patch) | |
tree | 5985e5f2dc217f3a46a567f9a1602f07da20d69c | |
parent | 8c0b5c02de4e26268ca3478bc61896be11e638fe (diff) |
BKE_deform: assert on invalid args
Will phase these out eventually
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 88885da474b..46d3dbb462f 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -92,8 +92,10 @@ bDeformGroup *defgroup_duplicate(bDeformGroup *ingroup) { bDeformGroup *outgroup; - if (!ingroup) + if (!ingroup) { + BLI_assert(0); return NULL; + } outgroup = MEM_callocN(sizeof(bDeformGroup), "copy deformGroup"); @@ -770,6 +772,9 @@ MDeformWeight *defvert_find_index(const MDeformVert *dvert, const int defgroup) } } } + else { + BLI_assert(0); + } return NULL; } @@ -781,8 +786,10 @@ MDeformWeight *defvert_verify_index(MDeformVert *dvert, const int defgroup) MDeformWeight *dw_new; /* do this check always, this function is used to check for it */ - if (!dvert || defgroup < 0) + if (!dvert || defgroup < 0) { + BLI_assert(0); return NULL; + } dw_new = defvert_find_index(dvert, defgroup); if (dw_new) @@ -813,8 +820,10 @@ void defvert_add_index_notest(MDeformVert *dvert, int defgroup, const float weig MDeformWeight *dw_new; /* do this check always, this function is used to check for it */ - if (!dvert || defgroup < 0) + if (!dvert || defgroup < 0) { + BLI_assert(0); return; + } dw_new = MEM_callocN(sizeof(MDeformWeight) * (dvert->totweight + 1), "defvert_add_to group, new deformWeight"); if (dvert->dw) { |