Fix T62121: Cycles crash with viewport render and smoke/pointclouds

This commit is contained in:
Brecht Van Lommel 2019-06-07 21:02:57 +02:00
parent 4fb4415172
commit 424566239f
Notes: blender-bot 2023-02-14 08:45:09 +01:00
Referenced by issue #62121, Smoke Crash with Cycles animation
1 changed files with 6 additions and 5 deletions

View File

@ -894,21 +894,22 @@ void BlenderSession::synchronize(BL::Depsgraph &b_depsgraph_)
else
sync->sync_camera(b_render, b_camera_override, width, height, "");
builtin_images_load();
/* unlock */
session->scene->mutex.unlock();
/* reset if needed */
if (scene->need_reset()) {
BufferParams buffer_params = BlenderSync::get_buffer_params(
b_render, b_v3d, b_rv3d, scene->camera, width, height);
session->reset(buffer_params, session_params.samples);
/* After session reset, so device is not accessing image data anymore. */
builtin_images_load();
/* reset time */
start_resize_time = 0.0;
}
/* unlock */
session->scene->mutex.unlock();
/* Start rendering thread, if it's not running already. Do this
* after all scene data has been synced at least once. */
session->start();