diff options
author | Peter Schlaile <peter@schlaile.de> | 2006-06-04 17:46:51 +0400 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2006-06-04 17:46:51 +0400 |
commit | 14ede28c56994772f6b7ccb9e20936912a4f5c35 (patch) | |
tree | 2083a72a2fb851e71a25139b5c66e63a4a151758 /source/blender/src/editseq.c | |
parent | cc28a00d15a8e4104e5790a6cba28991e7d8b2f0 (diff) |
==Sequencer==
Bugfix: If you use the IPO-pinning feature and edited an IPO that wasn't
highlighted as the current Sequence (current Sequence being a Metastrip),
you'll get obscure crashes, since the code
a) was mistakenly using last_seq
b) didn't test for se->ok != 2, thereby doing double frees on imbufs
Am I the only one, who wants to remove the last_seq global completely... ?
Diffstat (limited to 'source/blender/src/editseq.c')
-rw-r--r-- | source/blender/src/editseq.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index e43d82f3323..ba750572aba 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -256,7 +256,7 @@ void update_seq_ipo_rect(Sequence * seq) seq->ipo->cur.xmax= end; } -void clear_last_seq(void) +void clear_seq_belonging_to_ipo(struct Ipo * ipo) { /* from (example) ipo: when it is changed, also do effects with same ipo */ Sequence *seq; @@ -264,27 +264,24 @@ void clear_last_seq(void) StripElem *se; int a; - if(last_seq) { - - ed= G.scene->ed; - if(ed==0) return; + ed= G.scene->ed; + if(ed==0) return; - WHILE_SEQ(&ed->seqbase) { - if(seq==last_seq || (last_seq->ipo && seq->ipo==last_seq->ipo)) { - a= seq->len; - se= seq->strip->stripdata; - if(se) { - while(a--) { - if(se->ibuf) IMB_freeImBuf(se->ibuf); - se->ibuf= 0; - se->ok= 1; - se++; - } + WHILE_SEQ(&ed->seqbase) { + if(seq->ipo == ipo) { + a= seq->len; + se= seq->strip->stripdata; + if(se) { + while(a--) { + if(se->ibuf && se->ok != 2) IMB_freeImBuf(se->ibuf); + se->ibuf= 0; + se->ok= 1; + se++; } } } - END_SEQ } + END_SEQ } static int test_overlap_seq(Sequence *test) |