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-08-20 14:40:13 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-08-20 14:40:37 +0300
commitef502127ddc0f5a06e76cb2f634655b8e9c8f740 (patch)
tree3a437269a9de801f371afb07b18f9c642de01173
parent00812008129bdab48d328775b09332af12118867 (diff)
Fix T90795: Moving keys in Grease Pencil Dopesheet crashes Blender
`td->loc` is referenced but not initialized.
-rw-r--r--source/blender/editors/transform/transform_convert_action.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_convert_action.c b/source/blender/editors/transform/transform_convert_action.c
index 8a3b254be5c..a5565b5fb88 100644
--- a/source/blender/editors/transform/transform_convert_action.c
+++ b/source/blender/editors/transform/transform_convert_action.c
@@ -241,16 +241,15 @@ static int GPLayerToTransData(TransData *td,
for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
if (is_prop_edit || (gpf->flag & GP_FRAME_SELECT)) {
if (FrameOnMouseSide(side, (float)gpf->framenum, cfra)) {
- /* memory is calloc'ed, so that should zero everything nicely for us */
- td->val = &tfd->val;
- td->ival = (float)gpf->framenum;
+ tfd->val = (float)gpf->framenum;
+ tfd->sdata = &gpf->framenum;
+
+ td->val = td->loc = &tfd->val; /* XXX: It's not a 3d array. */
+ td->ival = td->iloc[0] = (float)gpf->framenum;
td->center[0] = td->ival;
td->center[1] = ypos;
- tfd->val = (float)gpf->framenum;
- tfd->sdata = &gpf->framenum;
-
/* Advance `td` now. */
td++;
tfd++;