summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-19 21:03:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-20 15:17:03 +0200
commit92741976101e8224291cf9af492209ff5412ca7b (patch)
tree4f347bbe91068f353623ef14a8f5e2bcb26766bc
parent999136c0d0a9964b4db40123e81aaf78229d10c3 (diff)
cid#1486006 help coverity see that pGlossaries won't be null
Change-Id: I0f0e8e5ac0169090cd1f99c8aa6bf16b1edf8a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117506 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 45f12f7b5b10..c5689f63a747 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -491,7 +491,9 @@ sal_Int32 SwXAutoTextGroup::getCount()
uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
+ if (!pGlossaries)
+ throw uno::RuntimeException();
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries->GetGroupDoc(m_sGroupName));
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();