vcl/source/fontsubset/sft.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
New commits: commit 4d5f4ebce9a9204c5e179c1dab82c39043c43d91 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Sep 14 09:15:50 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Sep 14 11:48:32 2022 +0200 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 <[email protected]> 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; }
