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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index b3bc2c72d34..55852139065 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -335,9 +335,11 @@ static void rna_Object_ray_cast(
if (isect_ray_aabb_v3_simple(origin, direction, bb->vec[0], bb->vec[6], &distmin, &distmax)) {
float dist = distmin >= 0 ? distmin : distmax;
if (dist > distance) {
+ goto finally;
}
}
else {
+ goto finally;
}
}
@@ -372,6 +374,7 @@ static void rna_Object_ray_cast(
}
if (*r_success == false) {
+finally:
zero_v3(r_location);
zero_v3(r_normal);
*r_index = -1;