diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-01-22 23:16:00 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-01-22 23:16:00 +0300 |
commit | 181424152611aa7d842ece0265fb6c630c7a4d77 (patch) | |
tree | 9a592b9f8349195ab93a2f722acf63d01289a265 /source/blender/editors/space_view3d/drawarmature.c | |
parent | cdaed4d360e77f20c51e21a7b3fc800c3ca92afc (diff) | |
parent | ce8889175a553967583a1152e71b4390a240a112 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/space_action/action_draw.c
Diffstat (limited to 'source/blender/editors/space_view3d/drawarmature.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 7ac176f82b1..af041e392c5 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -2459,6 +2459,10 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base if (end <= start) return; + /* prevent infinite loops if this is set to 0 - T49527 */ + if (arm->ghostsize < 1) + arm->ghostsize = 1; + stepsize = (float)(arm->ghostsize); range = (float)(end - start); @@ -2604,7 +2608,11 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) calc_action_range(adt->action, &start, &end, 0); if (start == end) return; - + + /* prevent infinite loops if this is set to 0 - T49527 */ + if (arm->ghostsize < 1) + arm->ghostsize = 1; + stepsize = (float)(arm->ghostsize); range = (float)(arm->ghostep) * stepsize + 0.5f; /* plus half to make the for loop end correct */ |