Index: src/psnames/psmodule.c |
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c |
index 7528696938a5cc44b8e799db7e04dcc3913dab52..361917415fa069878c40ec80eec50a25bfba90cd 100644 |
--- a/src/psnames/psmodule.c |
+++ b/src/psnames/psmodule.c |
@@ -521,7 +521,7 @@ |
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST |
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, |
+ FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, |
(PS_Unicode_ValueFunc) ps_unicode_value, |
(PS_Unicodes_InitFunc) ps_unicodes_init, |
(PS_Unicodes_CharIndexFunc)ps_unicodes_char_index, |
@@ -536,7 +536,7 @@ |
#else |
- FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, |
+ FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, |
0, |
0, |
0, |
@@ -552,7 +552,7 @@ |
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ |
- FT_DEFINE_SERVICEDESCREC1(pscmaps_services, |
+ FT_DEFINE_SERVICEDESCREC1(pscmaps_services, |
FT_SERVICE_ID_POSTSCRIPT_CMAPS, &FT_PSCMAPS_INTERFACE_GET |
) |
@@ -563,7 +563,19 @@ |
psnames_get_service( FT_Module module, |
const char* service_id ) |
{ |
+ /* FT_PSCMAPS_SERVICES_GET derefers `library' in PIC mode */ |
+#ifdef FT_CONFIG_OPTION_PIC |
+ FT_Library library; |
+ |
+ |
+ if ( !module ) |
+ return NULL; |
+ library = module->library; |
+ if ( !library ) |
+ return NULL; |
+#else |
FT_UNUSED( module ); |
+#endif |
return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id ); |
} |
@@ -578,7 +590,7 @@ |
#endif |
FT_DEFINE_MODULE(psnames_module_class, |
- |
+ |
0, /* this is not a font driver, nor a renderer */ |
sizeof ( FT_ModuleRec ), |