Code cleanup: avoid call to BLI_countlist

This commit is contained in:
Campbell Barton 2014-05-29 02:22:04 +10:00
parent e3b47c1e03
commit 953559a794

@ -3075,13 +3075,12 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seq
ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown)
{
Editing *ed = BKE_sequencer_editing_get(context->scene, false);
int count;
ListBase *seqbasep;
if (ed == NULL) return NULL;
count = BLI_countlist(&ed->metastack);
if ((chanshown < 0) && (count > 0)) {
if ((chanshown < 0) && !BLI_listbase_is_empty(&ed->metastack)) {
int count = BLI_countlist(&ed->metastack);
count = max_ii(count + chanshown, 0);
seqbasep = ((MetaStack *)BLI_findlink(&ed->metastack, count))->oldbasep;
}