diff options
| author | Graham Madarasz <graham@lindenlab.com> | 2013-06-12 09:16:19 -0700 |
|---|---|---|
| committer | Graham Madarasz <graham@lindenlab.com> | 2013-06-12 09:16:19 -0700 |
| commit | d2b253f1f6072beead770519849ad3b18a1a4359 (patch) | |
| tree | c50dcc7ea602746d156e24a9127721a95f640007 /indra/newview/llvovolume.cpp | |
| parent | 48324a93833cee8aca7559588ee5f2b4afa250fa (diff) | |
Changes to protect against use of normalize3fast on degenerate vectors
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rwxr-xr-x | indra/newview/llvovolume.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0aa56fcc0f..8962d7cadf 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3751,7 +3751,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& { *normal = n; } - + // guard against NaNs in normalize below + llassert(normal->dot3(*normal).getF32() > F_APPROXIMATELY_ZERO); (*normal).normalize3fast(); } @@ -3774,6 +3775,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& { *tangent = tn; } + // guard against NaNs in normalize below + llassert(tangent->dot3(*tangent).getF32() > F_APPROXIMATELY_ZERO); (*tangent).normalize3fast(); } |
