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:
authorTon Roosendaal <ton@blender.org>2011-03-21 20:10:55 +0300
committerTon Roosendaal <ton@blender.org>2011-03-21 20:10:55 +0300
commit67cbf22211af8864b32b55ce337290d832e8107f (patch)
tree4595680f21a52896f8cbfb62e546c089e7a2bf50 /source/blender/blenkernel/intern/texture.c
parent9a75ba4463eddf55493c516f6b9e851771ff6fe5 (diff)
Bugfix #26549
Using environment map type "load" increased user counter on each preview render. Also noticed that this type of envmap use wasn't threadsafe, causing imbufs being allocated for all threads. Also fixed that.
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 12aef5f4b29..3ce4acf5902 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -788,7 +788,10 @@ Tex *localize_texture(Tex *tex)
}
if(texn->coba) texn->coba= MEM_dupallocN(texn->coba);
- if(texn->env) texn->env= BKE_copy_envmap(texn->env);
+ if(texn->env) {
+ texn->env= BKE_copy_envmap(texn->env);
+ id_us_min(texn->env->ima);
+ }
if(texn->pd) texn->pd= MEM_dupallocN(texn->pd);
if(texn->vd) {
texn->vd= MEM_dupallocN(texn->vd);