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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-05-10 10:13:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-05-10 10:18:52 +0300
commit1fb97ffeedc9aefa4351b34bdc51764817dd2140 (patch)
treef2a222580008be7a55f8157047a8caf91fb2a657
parent45d9df853ea8e01b4cfb04922c19a44545b0bd44 (diff)
Fix T44644 Missing thread-protection (spinlock) of image in new multiview code.
Many thanks to Sergey, for practically giving the solution! Note that it may also fix T44345, depends whether there are other missing protections/locks or not...
-rw-r--r--source/blender/blenkernel/intern/image.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 4275b0200d0..eeb2f83fd73 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2427,11 +2427,15 @@ void BKE_image_verify_viewer_views(const RenderData *rd, Image *ima, ImageUser *
}
if (do_reset) {
+ BLI_spin_lock(&image_spin);
+
image_free_cached_frames(ima);
BKE_image_free_views(ima);
/* add new views */
image_viewer_create_views(rd, ima);
+
+ BLI_spin_unlock(&image_spin);
}
BLI_unlock_thread(LOCK_DRAW_IMAGE);