Fix T90795: Moving keys in Grease Pencil Dopesheet crashes Blender

`td->loc` is referenced but not initialized.
This commit is contained in:
Germano Cavalcante 2021-08-20 08:40:13 -03:00
parent 0081200812
commit ef502127dd
Notes: blender-bot 2023-02-14 11:07:28 +01:00
Referenced by issue #90795, Moving keys in Grease Pencil Dopesheet crashes Blender
1 changed files with 5 additions and 6 deletions

View File

@ -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++;