Fix T57811: Render crashes in certain scenes when AO Bounces are used

This commit is contained in:
Sergey Sharybin
2018-11-21 14:17:26 +01:00
parent 6f48bfc7a8
commit 968bf0df14
@@ -309,7 +309,7 @@ ccl_device_inline int ray_triangle_intersect8(
return 2;
}
/* If maximum number of hits reached, block all light. */
else if(*num_hits == max_hits) {
else if(num_hits == NULL || *num_hits == max_hits) {
return 2;
}
/* Move on to next entry in intersections array. */