Cycles Light Tree: Add case for when an emitter is not selected #111292

Merged
Weizhen Huang merged 1 commits from Alaska/blender:gracefully-handle-111277-issue into main 2023-08-23 11:54:28 +02:00
1 changed files with 1 additions and 1 deletions

View File

@ -596,7 +596,7 @@ ccl_device int light_tree_cluster_select_emitter(KernelGlobals kg,
has_importance |= ((importance[0] > 0) << i);
}
if (total_importance[0] == 0.0f) {
if (total_importance[0] == 0.0f || selected_index == -1) {
return -1;
}