Skip to content
Snippets Groups Projects
Commit 3ac41f91 authored by Richard Nelson's avatar Richard Nelson
Browse files

fix for crash in debug mode when in renderGlyph()

reviewed by davep
parent 2c29acba
No related branches found
No related tags found
No related merge requests found
......@@ -674,7 +674,6 @@ S32 LLFontGL::render(const LLWString &wstr,
}
glBegin(GL_QUADS);
for (i = begin_offset; i < begin_offset + length; i++)
{
llwchar wch = wstr[i];
......@@ -703,8 +702,6 @@ S32 LLFontGL::render(const LLWString &wstr,
break;
}
glEnd();
ext_image->bind();
const F32 ext_x = cur_render_x + (EXT_X_BEARING * sScaleX);
const F32 ext_y = cur_render_y + (EXT_Y_BEARING * sScaleY + mAscender - mLineHeight);
......@@ -740,15 +737,12 @@ S32 LLFontGL::render(const LLWString &wstr,
// Bind the font texture
mImageGLp->bind();
glBegin(GL_QUADS);
}
else
{
if (!hasGlyph(wch))
{
glEnd();
(const_cast<LLFontGL*>(this))->addChar(wch);
glBegin(GL_QUADS);
}
const LLFontGlyphInfo* fgi= getGlyphInfo(wch);
......@@ -785,9 +779,7 @@ S32 LLFontGL::render(const LLWString &wstr,
// Kern this puppy.
if (!hasGlyph(next_char))
{
glEnd();
(const_cast<LLFontGL*>(this))->addChar(next_char);
glBegin(GL_QUADS);
}
cur_x += getXKerning(wch, next_char);
}
......@@ -804,8 +796,6 @@ S32 LLFontGL::render(const LLWString &wstr,
}
}
glEnd();
if (right_x)
{
*right_x = cur_x / sScaleX;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment