Forgot to check in last change.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c
index 94a0706..980609a 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 03458cd..cdb7482 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 2480c3f..19a1830 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 )