diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-27 10:55:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-27 10:55:33 +0400 |
commit | ae6907a065da928043da35221ca879f1d58ecf0b (patch) | |
tree | 938caaa33074076aee6eb127dd4dfc77e7efe5d4 /source/blender/editors/animation/keyframes_draw.c | |
parent | b78b1924f3999bdc365984431f8f3ecf16ef4d1a (diff) |
fix [#32417] Grease Pencil color change + DopeSheet 'Summary' = crash
summery wasn't checking fcurve types.
Diffstat (limited to 'source/blender/editors/animation/keyframes_draw.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index d024e2b0393..98ab6dc99a6 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -857,13 +857,21 @@ void summary_to_keylist(bAnimContext *ac, DLRBT_Tree *keys, DLRBT_Tree *blocks) /* loop through each F-Curve, grabbing the keyframes */ for (ale = anim_data.first; ale; ale = ale->next) { - fcurve_to_keylist(ale->adt, ale->data, keys, blocks); - if (ale->datatype == ALE_MASKLAY) { - mask_to_keylist(ac->ads, ale->data, keys); - } - else if (ale->datatype == ALE_GPFRAME) { - gpl_to_keylist(ac->ads, ale->data, keys); + switch (ale->datatype) { + case ALE_FCURVE: + fcurve_to_keylist(ale->adt, ale->data, keys, blocks); + break; + case ALE_MASKLAY: + mask_to_keylist(ac->ads, ale->data, keys); + break; + case ALE_GPFRAME: + gpl_to_keylist(ac->ads, ale->data, keys); + break; + default: + printf("%s: datatype %d unhandled\n", __func__, ale->datatype); + break; + } } |