summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-04-16 15:02:27 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-04-16 15:02:27 +0300
commit8589d8175e71665237384b36d591d7de7e2fa7dd (patch)
tree585c9437374da3a48b31501611cf7e3b9189971c /indra/llrender
parent5f49061661a401980aa89195995bfb165b33ff12 (diff)
parent05116bac35403e6d8f593b7f057602afa057396d (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/llrender')
-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 8addee606b..ff47c57c70 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1738,8 +1738,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))