aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llfont.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/linden/indra/llrender/llfont.cpp b/linden/indra/llrender/llfont.cpp
index c64744e..ed787e0 100644
--- a/linden/indra/llrender/llfont.cpp
+++ b/linden/indra/llrender/llfont.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -135,6 +136,7 @@ LLFont::LLFont(LLImageRaw *imagep)
135 mNumComponents = 0; 136 mNumComponents = 0;
136 mFallbackFontp = NULL; 137 mFallbackFontp = NULL;
137 mIsFallback = FALSE; 138 mIsFallback = FALSE;
139 mFTFace = NULL;
138} 140}
139 141
140 142
@@ -143,7 +145,8 @@ LLFont::~LLFont()
143 mRawImagep = NULL; // dereferences or deletes image 145 mRawImagep = NULL; // dereferences or deletes image
144 146
145 // Clean up freetype libs. 147 // Clean up freetype libs.
146 FT_Done_Face(mFTFace); 148 if (mFTFace)
149 FT_Done_Face(mFTFace);
147 mFTFace = NULL; 150 mFTFace = NULL;
148 151
149 // Delete glyph info 152 // Delete glyph info
@@ -200,6 +203,7 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F
200 { 203 {
201 // Clean up freetype libs. 204 // Clean up freetype libs.
202 FT_Done_Face(mFTFace); 205 FT_Done_Face(mFTFace);
206 mFTFace = NULL;
203 return FALSE; 207 return FALSE;
204 } 208 }
205 209