summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 2e827ed442..3f2eb61641 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -190,6 +190,7 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
if (mode > NUM_MODES)
{
llerrs << "Invalid draw mode: " << mode << llendl;
+ return;
}
glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
@@ -217,6 +218,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
if (mode > NUM_MODES)
{
llerrs << "Invalid draw mode: " << mode << llendl;
+ return;
}
glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT,
@@ -240,6 +242,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
if (mode > NUM_MODES)
{
llerrs << "Invalid draw mode: " << mode << llendl;
+ return;
}
glDrawArrays(sGLMode[mode], first, count);