From 8f548880714b84d5fc557fd2c1e1344c55dcfb54 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Fri, 12 Mar 2010 11:59:43 +0000 Subject: Fix for EXT-6336 Minor memory leak in LLFontRegistry::createFont Reviewed by: Tofu --- indra/llrender/llfontregistry.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llrender') diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 7a3d6ec4f2..e619f89e1d 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -469,6 +469,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) else { fontlist.push_back(fontp->mFontFreetype); + delete fontp; + fontp = NULL; } } } -- cgit v1.2.3 From 91b90b0a1749471a9016c4935b58c08a3dd66523 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 23 Mar 2010 11:18:01 -0700 Subject: EXT-5549 Can't select last character in chat window --- indra/llrender/llfontgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 768f042e69..d9e1976341 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -673,7 +673,7 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t target_x *= sScaleX; // max_chars is S32_MAX by default, so make sure we don't get overflow - const S32 max_index = begin_offset + llmin(S32_MAX - begin_offset, max_chars); + const S32 max_index = begin_offset + llmin(S32_MAX - begin_offset, max_chars - 1); F32 scaled_max_pixels = max_pixels * sScaleX; -- cgit v1.2.3