diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-18 08:16:51 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-18 08:16:51 +0400 |
commit | d1bafa00c62a3984421617146a9fed0a7671f8e9 (patch) | |
tree | f21edbc0356455fc5b1850233a4b129adaa470b3 /source/blender/editors/animation | |
parent | ffdd2d12ce79f778aaab462209921db8abb27cb1 (diff) |
2.5 - Quick fix for NLA drawing
When some object had materials that may have been driven/animated, a crash could sometimes occur if some material-slot had no material.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 42943475a57..ecc8012f3ec 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1471,18 +1471,20 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int for (a=0; a < ob->totcol; a++) { Material *ma= give_current_material(ob, a); - /* if material has relevant animation data, break */ - ANIMDATA_FILTER_CASES(ma, - { - /* for the special AnimData blocks only case, we only need to add - * the block if it is valid... then other cases just get skipped (hence ok=0) - */ - ANIMDATA_ADD_ANIMDATA(ma); - matOk=0; - }, - matOk= 1;, - matOk= 1;, - matOk= 1;) + if (ma) { + /* if material has relevant animation data, break */ + ANIMDATA_FILTER_CASES(ma, + { + /* for the special AnimData blocks only case, we only need to add + * the block if it is valid... then other cases just get skipped (hence ok=0) + */ + ANIMDATA_ADD_ANIMDATA(ma); + matOk=0; + }, + matOk= 1;, + matOk= 1;, + matOk= 1;) + } if (matOk) break; |