summaryrefslogtreecommitdiffstats
path: root/src/psaux/psobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux/psobjs.c')
-rw-r--r--src/psaux/psobjs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index fe8398a..45c7419 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,8 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1588,6 +1589,13 @@
FT_Error error;
+ /* this might happen in invalid fonts */
+ if ( !outline )
+ {
+ FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" ));
+ return PSaux_Err_Invalid_File_Format;
+ }
+
if ( !builder->load_points )
{
outline->n_contours++;
@@ -1621,7 +1629,7 @@
if ( builder->parse_state == T1_Parse_Have_Path )
error = PSaux_Err_Ok;
- else if ( builder->parse_state == T1_Parse_Have_Moveto )
+ else
{
builder->parse_state = T1_Parse_Have_Path;
error = t1_builder_add_contour( builder );