diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-02-13 14:45:09 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-02-13 14:45:09 +0200 |
commit | 8f65593786a4302a1ef7c95ce048bd658367a220 (patch) | |
tree | 5f3741db7fa9d730dbcd6513721f922eee764577 /indra/llrender | |
parent | e394c0623d5b015ba5495b3c80559a7420186c5b (diff) |
MAINT-8146 Clearing pointers
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llfontfreetype.cpp | 9 |
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; } |