diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-10-10 22:42:20 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-10-10 22:42:20 +0400 |
commit | deb30e8f9e7858a6e7800a31d0b2051471406162 (patch) | |
tree | b0e5c86c8c3e44cdb6f3a0aae579b4826293f390 | |
parent | 622ffe263a61c1312e14ce74de148e7106b4b183 (diff) |
Fix #19571 (reported by Markus Ilmola):
Added missing callbacks. Was leading to crashs when the raytree was empty.
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject.cpp | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/rayobject_instance.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index 621fd3f794e..d8880b51c6c 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -559,6 +559,9 @@ static float RE_rayobject_empty_cost(RayObject *o) return 0.0; } +static void RE_rayobject_empty_hint_bb(RayObject *o, RayHint *hint, float *min, float *max) +{} + static RayObjectAPI empty_api = { RE_rayobject_empty_intersect, @@ -566,7 +569,8 @@ static RayObjectAPI empty_api = NULL, //static void RE_rayobject_instance_done(RayObject *o); RE_rayobject_empty_free, RE_rayobject_empty_bb, - RE_rayobject_empty_cost + RE_rayobject_empty_cost, + RE_rayobject_empty_hint_bb }; static RayObject empty_raytree = { &empty_api, {0, 0} }; diff --git a/source/blender/render/intern/source/rayobject_instance.c b/source/blender/render/intern/source/rayobject_instance.c index 9329d110870..e2f4dc5a9dd 100644 --- a/source/blender/render/intern/source/rayobject_instance.c +++ b/source/blender/render/intern/source/rayobject_instance.c @@ -41,6 +41,9 @@ static void RE_rayobject_instance_free(RayObject *o); static void RE_rayobject_instance_bb(RayObject *o, float *min, float *max); static float RE_rayobject_instance_cost(RayObject *o); +static void RE_rayobject_instance_hint_bb(RayObject *o, RayHint *hint, float *min, float *max) +{} + static RayObjectAPI instance_api = { RE_rayobject_instance_intersect, @@ -48,7 +51,8 @@ static RayObjectAPI instance_api = NULL, //static void RE_rayobject_instance_done(RayObject *o); RE_rayobject_instance_free, RE_rayobject_instance_bb, - RE_rayobject_instance_cost + RE_rayobject_instance_cost, + RE_rayobject_instance_hint_bb }; typedef struct InstanceRayObject |