Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-09-28 16:23:57 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-09-28 16:24:02 +0300
commit3e78c9e5bb179e84d542bc698fc6f6d7c111d1e1 (patch)
tree40679501dbd0df51ff0300c0ffb04b9167e948a6 /source/blender/editors/transform/transform_mode_timescale.c
parent3674347849311b3722c27c67a61b1fac5528bd6b (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.c2
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;
}
}
}