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-01-17 21:16:10 +0300
committerTon Roosendaal <ton@blender.org>2011-01-17 21:16:10 +0300
commit08287102046993203a4dd891552efc4a4ced51a4 (patch)
tree11cf097ecf7bfde6ee777dd7d27454d5479edcf2 /source/blender/nodes/intern/TEX_nodes
parent4b7930dbbd8a11fb5db3e1cc81ca9ca5b0a69fc0 (diff)
Bugfix #25657
Three code fixes for 1 report. User experienced crashes while painting on float buffer + having preview renders on. - Texture Nodes: Image was re-allocated without using proper thread lock - Paint code: old convention to free the byte rect from a float image as signal to re-create now is a proper flag. This keeps image memory unchanged. Nice for render. - Imbuf: call to make a byte rect from float was freeing mipmaps unnecessary.
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes')
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_image.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_image.c b/source/blender/nodes/intern/TEX_nodes/TEX_image.c
index c764c7a22d2..7c680b4c25a 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_image.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_image.c
@@ -58,7 +58,13 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(i
py = (int)( (y-yoff) * ysize );
if( (!xsize) || (!ysize) ) return;
- if( !ibuf->rect_float ) IMB_float_from_rect(ibuf);
+
+ if( !ibuf->rect_float ) {
+ BLI_lock_thread(LOCK_IMAGE);
+ if( !ibuf->rect_float )
+ IMB_float_from_rect(ibuf);
+ BLI_unlock_thread(LOCK_IMAGE);
+ }
while( px < 0 ) px += ibuf->x;
while( py < 0 ) py += ibuf->y;