summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llfontfreetype.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index bd2eef7fd3..ab668dc192 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -199,6 +199,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
else
{
delete pFileStream;
+ pFileStream = NULL;
return FALSE;
}
#else
@@ -214,6 +215,8 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
pFileStream->close();
delete pFileStream;
delete pFtStream;
+ pFileStream = NULL;
+ pFtStream = NULL;
#endif
return FALSE;
}
@@ -229,13 +232,15 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
if (error)
{
+ // Clean up freetype libs.
+ FT_Done_Face(mFTFace);
#ifdef LL_WINDOWS
pFileStream->close();
delete pFileStream;
delete pFtStream;
+ pFileStream = NULL;
+ pFtStream = NULL;
#endif
- // Clean up freetype libs.
- FT_Done_Face(mFTFace);
mFTFace = NULL;
return FALSE;
}