Merging r50037 through r50039 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / sequencer.c
index 7daa7fd723c99f80f2132ece9af8f4ed3acc4958..edbbbe10300d841fcd95bc67d3b7ee0f166c2890 100644 (file)
@@ -205,14 +205,7 @@ void BKE_sequence_free(Scene *scene, Sequence *seq)
        }
 
        /* free modifiers */
-       if (seq->modifiers.first) {
-               SequenceModifierData *smd, *smd_next;
-
-               for (smd = seq->modifiers.first; smd; smd = smd_next) {
-                       smd_next = smd->next;
-                       BKE_sequence_modifier_free(smd);
-               }
-       }
+       BKE_sequence_modifier_clear(seq);
 
        BKE_sequencer_cache_cleanup_sequence(seq);
        BKE_sequencer_preprocessed_cache_cleanup_sequence(seq);
@@ -2574,7 +2567,8 @@ static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra)
 
                        ibuf = do_render_strip_uncached(context, seq, cfra);
 
-                       BKE_sequencer_preprocessed_cache_put(context, seq, cfra, SEQ_STRIPELEM_IBUF, ibuf);
+                       if (ibuf)
+                               BKE_sequencer_preprocessed_cache_put(context, seq, cfra, SEQ_STRIPELEM_IBUF, ibuf);
                }
        }