Commit 46ae3db63d3d6202da40002baf7a82dd025a214f

sammy 2008-04-28T09:10:37

* Crash fix: do not try to delete FTFont::glyphList if the constructor failed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 0fbb20c..3bd2ff8 100644
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -66,7 +66,10 @@ FTFont::FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
 
 FTFont::~FTFont()
 {
-    delete glyphList;
+    if(glyphList)
+    {
+        delete glyphList;
+    }
 }