Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-28 20:22:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-13 18:47:10 +0400
commit953559a7945f3bd36e49fba2b9512b396c3863aa (patch)
treebfba344fdc044fb71fc0a9426ce240c5a9d82066 /source
parente3b47c1e034868f5d73548e6fa7ca98c11f9f82f (diff)
Code cleanup: avoid call to BLI_countlist
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index a1cd6b87a05..4118be67a38 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -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;
}