diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-18 12:03:45 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-18 13:01:19 +0200 |
commit | 63fc008870c7c070c8e30b022aeb314e882ca8d2 (patch) | |
tree | b3227ff96b5397eb7ce77ef2b07d58ff1e89f6f1 /i18npool/source/transliteration/textToPronounce_zh.cxx | |
parent | c2e6a068c112f4c5866b6371d02362bd71f903a3 (diff) |
cid#1491946 and cid#1491949 deference before null check
after
commit c7551e8a46e2f9f8142aa7921a0494221ae096e8
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu Sep 16 10:36:48 2021 +0200
speedup CharacterClassificationImpl::toUpper
Change-Id: If09857f89a4fa7de56831ea16d0b3ec8c50cfaf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122295
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'i18npool/source/transliteration/textToPronounce_zh.cxx')
-rw-r--r-- | i18npool/source/transliteration/textToPronounce_zh.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx index a8410592ae42..29e274c452e8 100644 --- a/i18npool/source/transliteration/textToPronounce_zh.cxx +++ b/i18npool/source/transliteration/textToPronounce_zh.cxx @@ -62,7 +62,8 @@ TextToPronounce_zh::foldingImpl(const OUString & inStr, sal_Int32 startPos, if (startPos + nCount > inStr.getLength()) nCount = inStr.getLength() - startPos; - (*pOffset)[0] = 0; + if (pOffset) + (*pOffset)[0] = 0; for (sal_Int32 i = 0; i < nCount; i++) { OUString pron(getPronounce(chArr[i])); sb.append(pron); |