diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-10 10:13:16 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-10 10:18:52 +0300 |
commit | 1fb97ffeedc9aefa4351b34bdc51764817dd2140 (patch) | |
tree | f2a222580008be7a55f8157047a8caf91fb2a657 /source | |
parent | 45d9df853ea8e01b4cfb04922c19a44545b0bd44 (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...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
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); |