summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 8c2751d84a..1b47f1ff14 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -1428,6 +1428,9 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
}
FX_DWORD nTables = GET_TT_SHORT(buffer + 4);
CFX_ByteString tables = _FPDF_ReadStringFromFile(pFile, nTables * 16);
+ if (tables.IsEmpty()) {
+ return;
+ }
CFX_ByteString names = _FPDF_LoadTableFromTT(pFile, tables, nTables, 0x6e616d65);
CFX_ByteString facename = _FPDF_GetNameFromTT(names, 1);
CFX_ByteString style = _FPDF_GetNameFromTT(names, 2);