From 3320266b3a058dda5be027f58c8365ac316da41c Mon Sep 17 00:00:00 2001 From: Homme Zwaagstra Date: Wed, 20 Feb 2013 09:02:56 +0000 Subject: [PATCH] Ensure that `msCopyLabel` copies `expression` and `text` directives --- mapcopy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mapcopy.c b/mapcopy.c index 3bf73bdb6d..8bfd26c913 100644 --- a/mapcopy.c +++ b/mapcopy.c @@ -346,6 +346,16 @@ int msCopyLabel(labelObj *dst, labelObj *src) MS_COPYSTELEM(outlinewidth); MS_COPYSTELEM(space_size_10); + if (msCopyExpression(&(dst->expression), &(src->expression)) != MS_SUCCESS) { + msSetError(MS_MEMERR, "Failed to copy expression.", "msCopyLabel()"); + return MS_FAILURE; + } + + if (msCopyExpression(&(dst->text), &(src->text)) != MS_SUCCESS) { + msSetError(MS_MEMERR, "Failed to copy text.", "msCopyLabel()"); + return MS_FAILURE; + } + /* ** now the styles */