Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-08-31 13:14:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-08-31 13:14:36 +0300
commit8ee76535da0b128b35a3ca1ec14b93c909dac359 (patch)
treea0d5923c601f09c15217a39faf6dfde491d8c7b5 /intern
parent976f14fbcf78a87011ec09e76573cc62b44b6da6 (diff)
Fix T56626: Cycles ambient occlusion only local : crash
Was caused by missing NULL pointer check in BVH8.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/bvh/obvh_local.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/bvh/obvh_local.h b/intern/cycles/kernel/bvh/obvh_local.h
index 50bcfa79b6c..92143193a6a 100644
--- a/intern/cycles/kernel/bvh/obvh_local.h
+++ b/intern/cycles/kernel/bvh/obvh_local.h
@@ -50,7 +50,10 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
int object = OBJECT_NONE;
float isect_t = ray->t;
- local_isect->num_hits = 0;
+ if(local_isect != NULL) {
+ local_isect->num_hits = 0;
+ }
+ kernel_assert((local_isect == NULL) == (max_hits == 0));
const int object_flag = kernel_tex_fetch(__object_flag, local_object);
if(!(object_flag & SD_OBJECT_TRANSFORM_APPLIED)) {