diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index af6ddca9f44..b07a54869ac 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1185,7 +1185,7 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data int items=0, a=0; /* firstly check that we actuallly have some materials, by gathering all materials in a temp list */ - for (a=0; a < ob->totcol; a++) { + for (a=1; a <= ob->totcol; a++) { Material *ma= give_current_material(ob, a); short ok = 0; diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index da1233c17f1..3b91e9153de 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -767,7 +767,7 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *bl if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) { int a; - for (a=0; a < ob->totcol; a++) { + for (a=1; a <= ob->totcol; a++) { Material *ma= give_current_material(ob, a); /* there might not be a material */ diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 828ff9792be..fe78a058d24 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -219,7 +219,7 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) { int a; - for (a=0; a < ob->totcol; a++) { + for (a=1; a <= ob->totcol; a++) { Material *ma= give_current_material(ob, a); /* there might not be a material */