summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-19 14:30:43 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-19 14:30:43 +0100
commitf28a9b3ca52978772e2963f4610a1bab1f1e9cee (patch)
treeb0c4a68d3260a01845c8d94b66e93efbd6b102b8 /indra/llrender/llimagegl.cpp
parent186224ab91e53c712537887f3d08293520338250 (diff)
parent532d732645f2369d17eba9c2ed0d594b486d416e (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index dae759ca5f..00f0fd5b9a 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1778,8 +1778,18 @@ BOOL LLImageGL::getMask(const LLVector2 &tc)
if (mPickMask)
{
- F32 u = tc.mV[0] - floorf(tc.mV[0]);
- F32 v = tc.mV[1] - floorf(tc.mV[1]);
+ F32 u,v;
+ if (LL_LIKELY(tc.isFinite()))
+ {
+ u = tc.mV[0] - floorf(tc.mV[0]);
+ v = tc.mV[1] - floorf(tc.mV[1]);
+ }
+ else
+ {
+ LL_WARNS_ONCE("render") << "Ugh, non-finite u/v in mask pick" << LL_ENDL;
+ u = v = 0.f;
+ llassert(false);
+ }
if (LL_UNLIKELY(u < 0.f || u > 1.f ||
v < 0.f || v > 1.f))