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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-02-06 18:38:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-02-06 18:38:03 +0300
commit49e07dfdfbe5edf133ec9a5f1ffa7cd8ac05c3a3 (patch)
tree9f6bf006cc8c089f54f601b3745e442b8c54893a /source/blender/blenlib
parent8c87af74409a3e6681698ba1bf150dd6155e202f (diff)
Fix T61190: Crash in particles distribution
Was visible with certain configuration only, is a numeric instability caused by degenerate ray direction. Not sure the distribution is correct, just fixing crash which was caused by usage of watertight intersection.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index aebff346432..f661ac01023 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -1813,7 +1813,7 @@ bool isect_ray_tri_watertight_v3(
/* Calculate determinant. */
det = u + v + w;
- if (UNLIKELY(det == 0.0f)) {
+ if (UNLIKELY(det == 0.0f || !isfinite(det))) {
return false;
}
else {