summaryrefslogtreecommitdiffstats
path: root/third_party/sfntly/src/subsetter/subsetter_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/sfntly/src/subsetter/subsetter_impl.cc')
-rw-r--r--third_party/sfntly/src/subsetter/subsetter_impl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/sfntly/src/subsetter/subsetter_impl.cc b/third_party/sfntly/src/subsetter/subsetter_impl.cc
index 4d4b0ff..217bd12a 100644
--- a/third_party/sfntly/src/subsetter/subsetter_impl.cc
+++ b/third_party/sfntly/src/subsetter/subsetter_impl.cc
@@ -154,6 +154,9 @@ bool SubsetterImpl::HasName(const char* font_name, Font* font) {
typedef std::map<int32_t, UnicodeString> NameMap;
NameMap names;
NameTablePtr name_table = down_cast<NameTable*>(font->GetTable(Tag::name));
+ if (name_table == NULL) {
+ return false;
+ }
for (int32_t i = 0; i < name_table->NameCount(); ++i) {
switch(name_table->NameId(i)) {