diff options
author | simon <none@none> | 2014-03-26 10:04:53 -0700 |
---|---|---|
committer | simon <none@none> | 2014-03-26 10:04:53 -0700 |
commit | 33dfc0a8a1ed56d7d24611981736fd5baf6b03c2 (patch) | |
tree | 5dfdbcede0d8c689e796cf65ebc21bb149c17b8e /indra/llrender | |
parent | 00a325ccb90b1c6800ec78e1211b5097d9c27a58 (diff) | |
parent | 5c20e06dbd0845e2d45daae610c43fc89e24028f (diff) |
Pull in downstream -bear, viewer-release and become version 3.7.5
Diffstat (limited to 'indra/llrender')
-rwxr-xr-x | indra/llrender/llcubemap.cpp | 5 | ||||
-rwxr-xr-x | indra/llrender/llfontfreetype.cpp | 15 | ||||
-rwxr-xr-x | indra/llrender/llimagegl.cpp | 5 |
3 files changed, 22 insertions, 3 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 45a3b18179..0dad4285d9 100755 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -116,6 +116,11 @@ void LLCubeMap::initRawData(const std::vector<LLPointer<LLImageRaw> >& rawimages const U8 *sd = rawimages[i]->getData(); U8 *td = mRawImages[i]->getData(); + if (!sd || !td) + { + continue; + } + S32 offset = 0; S32 sx, sy, so; for (int y = 0; y < 64; y++) diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 84c782e958..7ab4e93da5 100755 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -448,7 +448,11 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l LLImageGL *image_gl = mFontBitmapCachep->getImageGL(bitmap_num); LLImageRaw *image_raw = mFontBitmapCachep->getImageRaw(bitmap_num); - image_gl->setSubImage(image_raw, 0, 0, image_gl->getWidth(), image_gl->getHeight()); + + if (image_gl) + { + image_gl->setSubImage(image_raw, 0, 0, image_gl->getWidth(), image_gl->getHeight()); + } return gi; } @@ -560,13 +564,18 @@ void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 { LLImageRaw *image_raw = mFontBitmapCachep->getImageRaw(bitmap_num); + if (!image_raw) + { + return; + } + llassert(!mIsFallback); - llassert(image_raw && (image_raw->getComponents() == 2)); + llassert(image_raw->getComponents() == 2); U8 *target = image_raw->getData(); - if (!data) + if (!data || !target) { return; } diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index ab875141c5..315cc57e51 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1251,6 +1251,11 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S return FALSE; } + if (!imageraw->getData()) + { + return FALSE; + } + mGLTextureCreated = false ; llassert(gGLManager.mInited); stop_glerror(); |