summaryrefslogtreecommitdiffstats
path: root/src/base/ftoutln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/ftoutln.c')
-rw-r--r--src/base/ftoutln.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 201ceab..fc28225 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2015 by */
+/* Copyright 1996-2016 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,7 +42,7 @@
static
- const FT_Outline null_outline = { 0, 0, 0, 0, 0, 0 };
+ const FT_Outline null_outline = { 0, 0, NULL, NULL, NULL, 0 };
/* documentation is in ftoutln.h */
@@ -415,11 +415,14 @@
if ( source == target )
return FT_Err_Ok;
- FT_ARRAY_COPY( target->points, source->points, source->n_points );
-
- FT_ARRAY_COPY( target->tags, source->tags, source->n_points );
+ if ( source->n_points )
+ {
+ FT_ARRAY_COPY( target->points, source->points, source->n_points );
+ FT_ARRAY_COPY( target->tags, source->tags, source->n_points );
+ }
- FT_ARRAY_COPY( target->contours, source->contours, source->n_contours );
+ if ( source->n_contours )
+ FT_ARRAY_COPY( target->contours, source->contours, source->n_contours );
/* copy all flags, except the `FT_OUTLINE_OWNER' one */
is_owner = target->flags & FT_OUTLINE_OWNER;