diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 17:46:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 17:46:15 +0400 |
commit | d31999767b635a7aeba2b0b152efa8155e3ec095 (patch) | |
tree | a978f8e1dc232896bf15b16534e5432a046e922f /source/blender/src/editdeform.c | |
parent | e192e7e02452c70511f688582d8d95d0a6267ee5 (diff) |
same as 2.44 stable - missing NULL checks.
Diffstat (limited to 'source/blender/src/editdeform.c')
-rw-r--r-- | source/blender/src/editdeform.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c index 7a086ed5be3..6d0c34f2bf8 100644 --- a/source/blender/src/editdeform.c +++ b/source/blender/src/editdeform.c @@ -334,11 +334,13 @@ void del_defgroup (Object *ob) MDeformVert *dvert= editLatt->dvert; int a, tot; - tot= editLatt->pntsu*editLatt->pntsv*editLatt->pntsw; - for(a=0, bp= editLatt->def; a<tot; a++, bp++, dvert++) { - for (i=0; i<dvert->totweight; i++){ - if (dvert->dw[i].def_nr > (ob->actdef-1)) - dvert->dw[i].def_nr--; + if (dvert) { + tot= editLatt->pntsu*editLatt->pntsv*editLatt->pntsw; + for(a=0, bp= editLatt->def; a<tot; a++, bp++, dvert++) { + for (i=0; i<dvert->totweight; i++){ + if (dvert->dw[i].def_nr > (ob->actdef-1)) + dvert->dw[i].def_nr--; + } } } } |