diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-08 06:20:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-08 06:20:47 +0400 |
commit | 2fd27753506013d602cbafe9fbb99649ba01c26c (patch) | |
tree | 641ff7c9520e5dfce0ac66cc829df1a64fdd7305 /source | |
parent | 99dd59f08c4825fb1f97ea7d94b644047466021a (diff) |
fix for crash in the sequencer if the video file fails to load (missing NULL check on imbuf),
all other uses of sequencer_imbuf_assign_spaces() check for NULL or assume IMB_allocImBuf() succeeds.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 90c3347a1df..49ed7f80be3 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1965,13 +1965,16 @@ static ImBuf *copy_from_ibuf_still(SeqRenderData context, Sequence *seq, float n static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, ImBuf *ibuf) { + /* warning: ibuf may be NULL if the video fails to load */ if (nr == 0 || nr == seq->len - 1) { /* we have to store a copy, since the passed ibuf * could be preprocessed afterwards (thereby silently * changing the cached image... */ ibuf = IMB_dupImBuf(ibuf); - sequencer_imbuf_assign_spaces(context.scene, ibuf); + if (ibuf) { + sequencer_imbuf_assign_spaces(context.scene, ibuf); + } if (nr == 0) { BKE_sequencer_cache_put(context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); |