diff options
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/ttgsubtable.h | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index b515d90a7f..4a71382da4 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -1519,7 +1519,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { } } if ((m_GlyphIndex[charcode] == 0 || m_GlyphIndex[charcode] == 0xffff) && - name != NULL) { + name) { if (name[0] == '.' && FXSYS_strcmp(name, ".notdef") == 0) { m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), 32); } else { diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h index e3c9965654..605d25fd57 100644 --- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h +++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h @@ -277,10 +277,9 @@ class CFX_CTTGSUBTable { TLookup() : LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(NULL) {} ~TLookup() { - if (SubTableCount > 0 && SubTable != NULL) { - for (int i = 0; i < SubTableCount; i++) { + if (SubTable) { + for (int i = 0; i < SubTableCount; ++i) delete SubTable[i]; - } delete[] SubTable; } } |