Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 13:50:48 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 13:50:48 +0400
commitafcc42c324e8f3bf6508f2087602a0e055eedead (patch)
tree3343bce62c8e4bf12610fcde813af213e1d8f382 /source/blender/makesrna
parent1e2afcddd3f1fd7b82fc0ea78fec2d80021fe844 (diff)
Fix #31102: changing scene.use_color_management from render_pre callback would crash.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 986c76db199..eb3c1c75cf4 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1077,8 +1077,11 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
bNode *node;
if (ntree && scene->use_nodes) {
- /* XXX images are freed here, stop render and preview threads, until Image is threadsafe */
- WM_jobs_stop_all(bmain->wm.first);
+ /* images are freed here, stop render and preview threads, until
+ * Image is threadsafe. when we are changing this propery from a
+ * python script in the render thread, don't stop own thread */
+ if(BLI_thread_is_main())
+ WM_jobs_stop_all(bmain->wm.first);
for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) {