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:
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;