summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCallum Prentice <callum@gmail.com>2016-12-15 10:58:23 -0800
committerCallum Prentice <callum@gmail.com>2016-12-15 10:58:23 -0800
commit067468885a189bb26b465dbff2358de81cc6e392 (patch)
treec6cbf0aed57d806a3a14471387fb107ec0b02d6e /indra
parentbf0a0807de5bbe5c47501e0b79f40d5e89da7811 (diff)
BUG-41027 (FIX) Changing login location at the login screen crashes the viewer
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llrender.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 0e242a20f6..98d3ab8435 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -2156,9 +2156,12 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol
}
}
- mVerticesp[mCount] = mVerticesp[mCount-1];
- mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
- mColorsp[mCount] = mColorsp[mCount-1];
+ if (mCount > 0)
+ {
+ mVerticesp[mCount] = mVerticesp[mCount - 1];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount - 1];
+ mColorsp[mCount] = mColorsp[mCount - 1];
+ }
}
void LLRender::vertex2i(const GLint& x, const GLint& y)