summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2005-08-18 07:40:32 +0000
committerWerner Lemberg <wl@gnu.org>2005-08-18 07:40:32 +0000
commit6ec747f1ac000086ca6a191d053ec0668a83014d (patch)
tree356b0be4aefb4e407f094cc83a0724495e40ef1e
parent73c6ebdae0fa295f591d7e4c1b8c200b47ae0d7c (diff)
downloadfreetype2-6ec747f1ac000086ca6a191d053ec0668a83014d.tar.gz
Forgot to check in last change.
-rw-r--r--src/base/ftgloadr.c19
-rw-r--r--src/cff/cffgload.c3
-rw-r--r--src/psaux/psobjs.c3
3 files changed, 20 insertions, 5 deletions
diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c
index 94a070673..980609af6 100644
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2004 by */
+/* Copyright 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -296,14 +296,23 @@
FT_BASE_DEF( void )
FT_GlyphLoader_Add( FT_GlyphLoader loader )
{
- FT_GlyphLoad base = &loader->base;
- FT_GlyphLoad current = &loader->current;
+ FT_GlyphLoad base;
+ FT_GlyphLoad current;
- FT_UInt n_curr_contours = current->outline.n_contours;
- FT_UInt n_base_points = base->outline.n_points;
+ FT_UInt n_curr_contours;
+ FT_UInt n_base_points;
FT_UInt n;
+ if ( !loader )
+ return;
+
+ base = &loader->base;
+ current = &loader->current;
+
+ n_curr_contours = current->outline.n_contours;
+ n_base_points = base->outline.n_points;
+
base->outline.n_points =
(short)( base->outline.n_points + current->outline.n_points );
base->outline.n_contours =
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 03458cdae..cdb748263 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -508,6 +508,9 @@
FT_Outline* outline = builder->current;
+ if ( !outline )
+ return;
+
/* XXXX: We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 2480c3fa2..19a183072 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1735,6 +1735,9 @@
FT_Outline* outline = builder->current;
+ if ( !outline )
+ return;
+
/* XXXX: We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )