[Bf-blender-cvs] [49e07dfdfbe] master: Fix T61190: Crash in particles distribution

Sergey Sharybin noreply at git.blender.org
Wed Feb 6 17:08:38 CET 2019


Commit: 49e07dfdfbe5edf133ec9a5f1ffa7cd8ac05c3a3
Author: Sergey Sharybin
Date:   Wed Feb 6 16:38:03 2019 +0100
Branches: master
https://developer.blender.org/rB49e07dfdfbe5edf133ec9a5f1ffa7cd8ac05c3a3

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.

===================================================================

M	source/blender/blenlib/intern/math_geom.c

===================================================================

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 {



More information about the Bf-blender-cvs mailing list