summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/pfr
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/pfr')
-rw-r--r--src/3rdparty/freetype/src/pfr/module.mk2
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrdrivr.c11
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrobjs.c11
3 files changed, 18 insertions, 6 deletions
diff --git a/src/3rdparty/freetype/src/pfr/module.mk b/src/3rdparty/freetype/src/pfr/module.mk
index 53ab34aa9..8d1d28a9d 100644
--- a/src/3rdparty/freetype/src/pfr/module.mk
+++ b/src/3rdparty/freetype/src/pfr/module.mk
@@ -16,7 +16,7 @@
FTMODULE_H_COMMANDS += PFR_DRIVER
define PFR_DRIVER
-$(OPEN_DRIVER)pfr_driver_class$(CLOSE_DRIVER)
+$(OPEN_DRIVER) FT_Driver_ClassRec, pfr_driver_class $(CLOSE_DRIVER)
$(ECHO_DRIVER)pfr $(ECHO_DRIVER_DESC)PFR/TrueDoc font files with extension *.pfr$(ECHO_DRIVER_DONE)
endef
diff --git a/src/3rdparty/freetype/src/pfr/pfrdrivr.c b/src/3rdparty/freetype/src/pfr/pfrdrivr.c
index 40206720e..15cca9854 100644
--- a/src/3rdparty/freetype/src/pfr/pfrdrivr.c
+++ b/src/3rdparty/freetype/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2006 by */
+/* Copyright 2002, 2003, 2004, 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -66,10 +66,16 @@
FT_Pos *anadvance )
{
PFR_Face face = (PFR_Face)pfrface;
- FT_Error error = PFR_Err_Bad_Argument;
+ FT_Error error = PFR_Err_Invalid_Argument;
*anadvance = 0;
+
+ if ( !gindex )
+ goto Exit;
+
+ gindex--;
+
if ( face )
{
PFR_PhyFont phys = &face->phy_font;
@@ -82,6 +88,7 @@
}
}
+ Exit:
return error;
}
diff --git a/src/3rdparty/freetype/src/pfr/pfrobjs.c b/src/3rdparty/freetype/src/pfr/pfrobjs.c
index 180446d73..56d617d88 100644
--- a/src/3rdparty/freetype/src/pfr/pfrobjs.c
+++ b/src/3rdparty/freetype/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,10 +41,15 @@
FT_LOCAL_DEF( void )
pfr_face_done( FT_Face pfrface ) /* PFR_Face */
{
- PFR_Face face = (PFR_Face)pfrface;
- FT_Memory memory = pfrface->driver->root.memory;
+ PFR_Face face = (PFR_Face)pfrface;
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = pfrface->driver->root.memory;
+
/* we don't want dangling pointers */
pfrface->family_name = NULL;
pfrface->style_name = NULL;