diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-02-26 12:13:41 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-02-26 11:52:02 +0000 |
commit | e99ba6c7ed32b97112df174c8986ca2ced919f68 (patch) | |
tree | 401b73503896c1bc4d1fe3290e5cc398a6e1d4f7 /vcl | |
parent | 9a4cef83c386199f740c85350da2bb53a7b3aa96 (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.cxx | 3 |
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; |