diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-09-28 16:23:57 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-09-28 16:24:02 +0300 |
commit | 3e78c9e5bb179e84d542bc698fc6f6d7c111d1e1 (patch) | |
tree | 40679501dbd0df51ff0300c0ffb04b9167e948a6 /source/blender/editors/transform/transform_mode_timescale.c | |
parent | 3674347849311b3722c27c67a61b1fac5528bd6b (diff) |
Fix T91766: NLA Editor - Segmentation fault on strip resize
NLA and Dope Sheet use a specific transform operation to scale.
Unlike the conventional resize operation, `TIME_SCALE` operates on `td->val`.
This is a bit outside the convention of transform operators.
The expected thing in this case would be to work in `td->loc` and use the conventional resize operator.
But for now, to fix the problem, use `td->loc` in the `TIME_SCALE` operation.
This commit also brings a cleanup in the style of some comments and removing unnecessary `memset`.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_timescale.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_timescale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_mode_timescale.c b/source/blender/editors/transform/transform_mode_timescale.c index 50fd714727b..0a7ae54982e 100644 --- a/source/blender/editors/transform/transform_mode_timescale.c +++ b/source/blender/editors/transform/transform_mode_timescale.c @@ -87,7 +87,7 @@ static void applyTimeScaleValue(TransInfo *t, float value) } /* now, calculate the new value */ - *(td->val) = ((td->ival - startx) * fac) + startx; + td->loc[0] = ((td->iloc[0] - startx) * fac) + startx; } } } |