summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-02-26 12:13:41 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-02-26 11:52:02 +0000
commite99ba6c7ed32b97112df174c8986ca2ced919f68 (patch)
tree401b73503896c1bc4d1fe3290e5cc398a6e1d4f7 /vcl
parent9a4cef83c386199f740c85350da2bb53a7b3aa96 (diff)
Don't abort when myPoints is empty
Change-Id: I6bbb2a1cce1c89b94d027acf94fd712706bff422 Reviewed-on: https://gerrit.libreoffice.org/2425 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/fontsubset/sft.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 3e41baf82f0c..e110c1225a12 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -752,7 +752,8 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
pa = (ControlPoint*)calloc(np, sizeof(ControlPoint));
assert(pa != 0);
- memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
+ if (np > 0)
+ memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
*pointArray = pa;
return np;