Fix: Sequencer crash with scene strip of no composite output

If a scene sequencer strip references a scene with no composite output,
it will crash due to null image buffer output. This patch fixes that by
allocating an empty buffer in those cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/117135
This commit is contained in:
Omar Emara
2024-01-16 09:13:30 +01:00
committed by Omar Emara
parent 5fb7569f9a
commit 753c52ba15

View File

@@ -1598,12 +1598,15 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context,
/* float buffers in the sequencer are not linear */
seq_imbuf_to_sequencer_space(context->scene, ibufs_arr[view_id], false);
}
else if (rres.ibuf->byte_buffer.data) {
else if (rres.ibuf && rres.ibuf->byte_buffer.data) {
ibufs_arr[view_id] = IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect);
memcpy(ibufs_arr[view_id]->byte_buffer.data,
rres.ibuf->byte_buffer.data,
4 * rres.rectx * rres.recty);
}
else {
ibufs_arr[view_id] = IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect);
}
if (view_id != context->view_id) {
seq_cache_put(&localcontext, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibufs_arr[view_id]);