diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 20:39:00 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 20:39:00 +0100 |
commit | 230314ac71a055458d9bff4fae744b8e25f7ada2 (patch) | |
tree | 35bcab18d57eda2c5f3665e287b06b2d8b7060cd /indra/llrender | |
parent | 90800c84c4836d2eb0425ed09b7dd83e86a106db (diff) | |
parent | 12dadac44e9d5af8728e7bedab586683b2660cb4 (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 14 |
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)) |