diff options
author | Peter Schlaile <peter@schlaile.de> | 2008-01-01 21:38:41 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2008-01-01 21:38:41 +0300 |
commit | fb3ed9e0a573d9296caddeba0f705b83949ee3ad (patch) | |
tree | 62c9331c4d4f8923d018795c06fc0a684422851f /source/blender/src/sequence.c | |
parent | 9db2035e3650ecbd1baf1943c490d6a4e140f2c3 (diff) |
== Sequencer ==
Added some additional NULL-checks. (se->ibuf can be null, shame on me :)
Diffstat (limited to 'source/blender/src/sequence.c')
-rw-r--r-- | source/blender/src/sequence.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index ba5052350ac..88766089317 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -1465,8 +1465,10 @@ static TStripElem* do_build_seq_array_recursively( if(count == 1) { se = do_build_seq_recursively(seq_arr[0], cfra); - se->ibuf_comp = se->ibuf; - IMB_refImBuf(se->ibuf_comp); + if (se->ibuf) { + se->ibuf_comp = se->ibuf; + IMB_refImBuf(se->ibuf_comp); + } return se; } @@ -1485,8 +1487,14 @@ static TStripElem* do_build_seq_array_recursively( } if (seq->blend_mode == SEQ_BLEND_REPLACE) { do_build_seq_recursively(seq, cfra); - se->ibuf_comp = se->ibuf; - IMB_refImBuf(se->ibuf); + if (se->ibuf) { + se->ibuf_comp = se->ibuf; + IMB_refImBuf(se->ibuf); + } else { + se->ibuf_comp = IMB_allocImBuf( + (short)seqrectx, (short)seqrecty, + 32, IB_rect, 0); + } break; } @@ -1509,8 +1517,14 @@ static TStripElem* do_build_seq_array_recursively( case -1: case 2: do_build_seq_recursively(seq, cfra); - se->ibuf_comp = se->ibuf; - IMB_refImBuf(se->ibuf_comp); + if (se->ibuf) { + se->ibuf_comp = se->ibuf; + IMB_refImBuf(se->ibuf_comp); + } else { + se->ibuf_comp = IMB_allocImBuf( + (short)seqrectx, (short)seqrecty, + 32, IB_rect, 0); + } break; case 1: if (i == 0) { @@ -1524,6 +1538,11 @@ static TStripElem* do_build_seq_array_recursively( break; case 0: do_build_seq_recursively(seq, cfra); + if (!se->ibuf) { + se->ibuf = IMB_allocImBuf( + (short)seqrectx, (short)seqrecty, + 32, IB_rect, 0); + } break; } |