summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llimagegl.cpp6
-rw-r--r--indra/llrender/llrender.cpp11
-rw-r--r--indra/llrender/llvertexbuffer.cpp4
3 files changed, 17 insertions, 4 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 81a5537f78..20cba68f84 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1267,6 +1267,12 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
llassert(gGLManager.mInited);
stop_glerror();
+ if (!imageraw || imageraw->isBufferInvalid())
+ {
+ LL_WARNS() << "Trying to create a texture from invalid image data" << LL_ENDL;
+ return FALSE;
+ }
+
if (discard_level < 0)
{
llassert(mCurrentDiscardLevel >= 0);
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 98d3ab8435..77c5921c9c 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -267,7 +267,14 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind)
}
else
{
- LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
+ if (texture)
+ {
+ LL_DEBUGS() << "NULL LLTexUnit::bind GL image" << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
+ }
return false;
}
}
@@ -286,7 +293,7 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
if(!texture)
{
- LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
+ LL_DEBUGS() << "NULL LLTexUnit::bind texture" << LL_ENDL;
return false;
}
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index c09d614c3c..3851669360 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -448,7 +448,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
else
{
- GLenum array[] =
+ static const GLenum array[] =
{
GL_VERTEX_ARRAY,
GL_NORMAL_ARRAY,
@@ -456,7 +456,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
GL_COLOR_ARRAY,
};
- GLenum mask[] =
+ static const GLenum mask[] =
{
MAP_VERTEX,
MAP_NORMAL,