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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user