diff options
Diffstat (limited to 'base/gxcpath.c')
-rw-r--r-- | base/gxcpath.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/gxcpath.c b/base/gxcpath.c index 082c3890b..c9fde9d49 100644 --- a/base/gxcpath.c +++ b/base/gxcpath.c @@ -1122,7 +1122,11 @@ gx_cpath_copy(const gx_clip_path * from, gx_clip_path * pcpath) pcpath->cached = NULL; l->single = from->rect_list->list.single; for (r = from->rect_list->list.head; r != NULL; r = r->next) { - s = gs_alloc_struct(from->rect_list->rc.memory, gx_clip_rect, &st_clip_rect, "gx_cpath_copy"); + if (pcpath->rect_list->rc.memory == NULL) + s = gs_alloc_struct(from->rect_list->rc.memory, gx_clip_rect, &st_clip_rect, "gx_cpath_copy"); + else + s = gs_alloc_struct(pcpath->rect_list->rc.memory, gx_clip_rect, &st_clip_rect, "gx_cpath_copy"); + if (s == NULL) return_error(gs_error_VMerror); *s = *r; |