summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-14 09:15:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-14 11:48:32 +0200
commit4d5f4ebce9a9204c5e179c1dab82c39043c43d91 (patch)
tree4bf1bbd3cd0441a3215364ba2e78cd2e15611b9a /vcl
parentcda1dbd978dba5bb8cd64ab28173a579133d4711 (diff)
always > 0 here due to preceding empty() check
Change-Id: I4df9f2ce7568ce793fb8682b5be92cb36296d06a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/fontsubset/sft.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 7e9d6e69ceff..57de32faa1ef 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -689,15 +689,14 @@ static int GetCompoundTTOutline(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, C
return 0;
np = myPoints.size();
- if (np > 0)
- {
- pa = static_cast<ControlPoint*>(calloc(np, sizeof(ControlPoint)));
- assert(pa != nullptr);
- memcpy(pa, myPoints.data(), np * sizeof(ControlPoint));
+ pa = static_cast<ControlPoint*>(calloc(np, sizeof(ControlPoint)));
+ assert(pa != nullptr);
+
+ memcpy(pa, myPoints.data(), np * sizeof(ControlPoint));
+
+ *pointArray = pa;
- *pointArray = pa;
- }
return np;
}