summaryrefslogtreecommitdiffstats
path: root/src/psnames/psmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psnames/psmodule.c')
-rw-r--r--src/psnames/psmodule.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 7528696..3619174 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 ),