Commit 94f6d57a4c4264e59493ccdf9b8cef92600c0c25

Ewald Hew 2017-10-16T11:48:31

[cff] Fix segfault on missing `psaux' (#52218) * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr. * modules.cfg: Update dependency list.

diff --git a/ChangeLog b/ChangeLog
index b7db5d9..160f445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-10-12  Ewald Hew  <ewaldhew@gmail.com>
+
+	[cff] Fix segfault on missing `psaux' (#52218)
+
+	* src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
+
+	* modules.cfg: Update dependency list.
+
 2017-10-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
 	[base, cff] Fix MSVC warnings.
diff --git a/modules.cfg b/modules.cfg
index 517111e..56a2340 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -42,7 +42,7 @@ FONT_MODULES += type1
 
 # CFF/OpenType font driver.
 #
-# This driver needs the `sfnt', `pshinter', and `psnames' modules.
+# This driver needs the `sfnt', `psaux', `pshinter', and `psnames' modules.
 FONT_MODULES += cff
 
 # Type 1 CID-keyed font driver.
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 069e904..e8479d4 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1595,7 +1595,8 @@
     FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
 
 
-    mm->done_blend( FT_FACE( face ) );
+    if (mm)
+      mm->done_blend( FT_FACE( face ) );
   }
 
 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */