forked from bartvdbraak/blender
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...
This commit is contained in:
parent
45d9df853e
commit
1fb97ffeed
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user