From ae6907a065da928043da35221ca879f1d58ecf0b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Aug 2012 06:55:33 +0000 Subject: fix [#32417] Grease Pencil color change + DopeSheet 'Summary' = crash summery wasn't checking fcurve types. --- source/blender/editors/animation/keyframes_draw.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'source') 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; + } } -- cgit v1.2.3