diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-06 07:45:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-06 07:45:11 +0400 |
commit | 34aa68f29935e2d5b92f339eb732385cd67535f9 (patch) | |
tree | 18c5c968a072a52d9013e56b007131f1aa0aa704 /source/blender/editors/mask/mask_select.c | |
parent | 0398ef6ae03afbcad3617dd631839494cd6831ee (diff) |
fix for using uninitialized boolean vars for mask select more/less
Diffstat (limited to 'source/blender/editors/mask/mask_select.c')
-rw-r--r-- | source/blender/editors/mask/mask_select.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index c524aeb06ee..90796e9eb93 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -809,8 +809,9 @@ static int mask_select_more_less(bContext *C, bool more) } for (spline = masklay->splines.first; spline; spline = spline->next) { + const bool cyclic = (spline->flag & MASK_SPLINE_CYCLIC) != 0; + bool start_sel, end_sel, prev_sel, cur_sel; int i; - bool start_sel, end_sel, prev_sel, cur_sel, cyclic = spline->flag & MASK_SPLINE_CYCLIC; /* reselect point if any handle is selected to make the result more predictable */ for (i = 0; i < spline->tot_point; i++) { @@ -826,6 +827,10 @@ static int mask_select_more_less(bContext *C, bool more) start_sel = !!MASKPOINT_ISSEL_KNOT(spline->points); end_sel = !!MASKPOINT_ISSEL_KNOT(&spline->points[spline->tot_point - 1]); } + else { + start_sel = false; + end_sel = false; + } for (i = 0; i < spline->tot_point; i++) { if (i == 0 && !cyclic) { |