diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-30 15:40:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-30 15:40:23 +0400 |
commit | 9e45fa7f2fb7b7044340c8a9b28b9a3dcc2e4300 (patch) | |
tree | b72d5d368453142898c68ab26550139b4237503f | |
parent | 385c8af44956b54a8d789bb3f55678f79b21a4de (diff) |
bugfix [#23106] Blender crashes (segfault) when scene strip file is missing
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 0651f1a6261..f55cae7eaef 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1800,8 +1800,8 @@ static ImBuf * seq_render_scene_strip_impl( { ImBuf * ibuf = 0; float frame= seq->sfra + nr + seq->anim_startofs; - float oldcfra = seq->scene->r.cfra; - Object *oldcamera= seq->scene->camera; + float oldcfra; + Object *oldcamera; ListBase oldmarkers; /* Hack! This function can be called from do_render_seq(), in that case @@ -1820,21 +1820,20 @@ static ImBuf * seq_render_scene_strip_impl( int doseq; int doseq_gl= G.rendering ? /*(scene->r.seq_flag & R_SEQ_GL_REND)*/ 0 : (scene->r.seq_flag & R_SEQ_GL_PREV); int have_seq= FALSE; - Scene *sce= seq->scene;// *oldsce= scene; + Scene *sce= seq->scene; /* dont refer to seq->scene above this point!, it can be NULL */ int sce_valid= FALSE; - have_seq= (sce->r.scemode & R_DOSEQ) - && sce->ed && sce->ed->seqbase.first; - if(sce) { + have_seq= (sce->r.scemode & R_DOSEQ) && sce->ed && sce->ed->seqbase.first; sce_valid= (sce->camera || have_seq); } - if (!sce_valid) { - return 0; - } + if (!sce_valid) + return NULL; + + oldcfra= seq->scene->r.cfra; + oldcamera= seq->scene->camera; - /* prevent eternal loop */ doseq= scene->r.scemode & R_DOSEQ; scene->r.scemode &= ~R_DOSEQ; |