diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 21:50:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 21:50:59 +0400 |
commit | c849a938a0585b473ecc3d28407f918ddd25df08 (patch) | |
tree | e9d918b5452016197cdbcf511d3d2890cf01df2e /source/blender/blenkernel/intern/anim.c | |
parent | 203e02f9d78dc88df42221b88d86a440ce6b70b4 (diff) |
fix for crash drawing zero length motion path and a leak with zero length paths.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 1763866c000..0747d87a0ab 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -171,7 +171,12 @@ bMotionPath *animviz_verify_motionpaths(Scene *scene, Object *ob, bPoseChannel * avs= &ob->avs; dst= &ob->mpath; } - + + /* avoid 0 size allocs */ + if(avs->path_sf >= avs->path_ef) { + return NULL; + } + /* if there is already a motionpath, just return that, * but provided it's settings are ok */ |