[Bf-blender-cvs] [b2ce0d8baae] cycles-x: Fix crash accessing SHadow Catcher pass without catchers in Cycles X

Sergey Sharybin noreply at git.blender.org
Thu Jul 8 12:42:00 CEST 2021


Commit: b2ce0d8baae16c2e6c08dae06541cc3a9e766507
Author: Sergey Sharybin
Date:   Thu Jul 8 12:41:06 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBb2ce0d8baae16c2e6c08dae06541cc3a9e766507

Fix crash accessing SHadow Catcher pass without catchers in Cycles X

===================================================================

M	intern/cycles/render/session.cpp

===================================================================

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index bc6dfc6ce47..687e8f47429 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -589,6 +589,10 @@ bool Session::get_render_tile_pixels(const string &pass_name, int num_components
   const bool has_denoised_result = path_trace_->has_denoised_result();
   if (pass->mode == PassMode::DENOISED && !has_denoised_result) {
     pass = Pass::find(scene->passes, pass->type);
+    if (pass == nullptr) {
+      /* Happens when denoised result pass is requested but is never written by the kernel. */
+      return false;
+    }
   }
 
   pass = Film::get_actual_display_pass(scene->passes, pass);



More information about the Bf-blender-cvs mailing list