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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-11-18 18:05:47 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-11-18 18:05:47 +0300
commit2218135f67bba61b88ed5657125f73ba69f46bd5 (patch)
treeb6865500a8eba7e80fd8dad6192544eb4270a257 /source/blender/makesrna/intern/rna_texture.c
parent54c6a9fd49bf2bdd9de8775b615c174aa55c40cd (diff)
Fix T41969: Enviropment map crash
The issue was caused by the threading conflict between main thread which might free environment map and render thread which might be using that environment map. Solved by stopping preview jobs when changing environment map. Sure there are still ways to run into threading conflict, but would rather solve this things case-by-case.
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index f098a659671..188a30d23ce 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -119,6 +119,7 @@ static EnumPropertyItem blend_type_items[] = {
#include "BKE_main.h"
#include "ED_node.h"
+#include "ED_render.h"
static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
{
@@ -443,8 +444,10 @@ static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex = ptr->id.data;
- if (tex->env)
+ if (tex->env) {
+ ED_preview_kill_jobs(bmain->wm.first, bmain);
BKE_free_envmapdata(tex->env);
+ }
rna_Texture_update(bmain, scene, ptr);
}