From 4536a4c6104085f39fe8fcd1c27f37caa3cd8950 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 21 Jul 2010 16:20:54 +0000 Subject: [PATCH] Fix #22841: crash rendering scene with opengl in sequencer as part of animation. Only allow this from main thread, opengl can't be called from render threads. It was already disabled in background mode. For now I'm going to consider this a limitation. --- source/blender/blenkernel/intern/sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 94aa2c62f1a..61415eb4a52 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -55,6 +55,7 @@ #include "BLI_listbase.h" #include "BLI_path_util.h" #include "BLI_string.h" +#include "BLI_threads.h" #include #include "IMB_imbuf.h" @@ -2258,7 +2259,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int seq->scene->markers.first= seq->scene->markers.last= NULL; #endif - if(sequencer_view3d_cb && doseq_gl && (seq->scene == scene || have_seq==0) && seq->scene->camera) { + if(sequencer_view3d_cb && BLI_thread_is_main() && doseq_gl && (seq->scene == scene || have_seq==0) && seq->scene->camera) { /* opengl offscreen render */ scene_update_for_newframe(seq->scene, seq->scene->lay); se->ibuf= sequencer_view3d_cb(seq->scene, seqrectx, seqrecty, scene->r.seq_prev_type);