summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index 42f77de57b..e317aa67fd 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -446,7 +446,7 @@ IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont)
if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->m_pGsubData)) {
return pGsubTable;
}
- delete pGsubTable;
+ pGsubTable->Release();
}
return NULL;
}
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
index c381a01304..6b1b4f2443 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -414,6 +414,11 @@ public:
delete this;
}
virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) FX_OVERRIDE;
+
CFX_CTTGSUBTable m_GsubImp;
+
+private:
+ ~CFX_GSUBTable() { }
};
#endif
+