From deb30e8f9e7858a6e7800a31d0b2051471406162 Mon Sep 17 00:00:00 2001 From: Andre Susano Pinto Date: Sat, 10 Oct 2009 18:42:20 +0000 Subject: Fix #19571 (reported by Markus Ilmola): Added missing callbacks. Was leading to crashs when the raytree was empty. --- source/blender/render/intern/raytrace/rayobject.cpp | 6 +++++- source/blender/render/intern/source/rayobject_instance.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'source') 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 -- cgit v1.2.3