diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-07-16 16:20:57 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-07-16 16:20:57 +0400 |
commit | 9fc66d5ce51333f7fa537c6856bc49609bb5918b (patch) | |
tree | a88eabe7e84ba3944c568cf9367f82e4f24c02df /source/blender/blenkernel | |
parent | ee593409e3fd33a624a8861edb3ec12786648415 (diff) |
Bugfix #6831: Crash when combining duplivert and mirror
I've added checks which should prevent crashes in this case. Sometimes vertex_dupli__mapFunc is called with no_f being NULL, but no_s should not be NULL in those cases.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 0019308a569..01e945855b6 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -384,8 +384,12 @@ static void vertex_dupli__mapFunc(void *userData, int index, float *co, float *n VECCOPY(obmat[3], vec); if(vdd->par->transflag & OB_DUPLIROT) { - - vec[0]= -no_f[0]; vec[1]= -no_f[1]; vec[2]= -no_f[2]; + if(no_f) { + vec[0]= -no_f[0]; vec[1]= -no_f[1]; vec[2]= -no_f[2]; + } + else if(no_s) { + vec[0]= -no_s[0]; vec[1]= -no_s[1]; vec[2]= -no_s[2]; + } q2= vectoquat(vec, vdd->ob->trackflag, vdd->ob->upflag); |