summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-01-30 19:30:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-01-30 21:26:21 +0100
commit27740793367369c043721697955666be3a1ccda9 (patch)
treed2e45beea11eaae25f6d0f841f96b816597e2340
parenta91855165dc7c119166b05c038d238f59c8c1281 (diff)
cid#1458033 Dereference after null check
pEntry isn't goint to be null, drop the null check Change-Id: I41447afe17fc69d6ca30387f1b74f23f86f6d109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87753 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 1063970181e9..395ab7094672 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1758,12 +1758,11 @@ void SwContentTree::Display( bool bActive )
rpContentT.reset(new SwContentType(pShell, nCntType, m_nOutlineLevel ));
OUString sEntry = rpContentT->GetName();
- SvTreeListEntry* pEntry;
Image aImage(GetBitmapForContentTypeId(nCntType));
bool bChOnDemand = 0 != rpContentT->GetMemberCount();
- pEntry = InsertEntry(sEntry, aImage, aImage,
+ SvTreeListEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
nullptr, bChOnDemand, TREELIST_APPEND, rpContentT.get());
- if(pEntry && !pEntry->HasChildren() && !pEntry->HasChildrenOnDemand())
+ if (!pEntry->HasChildren() && !pEntry->HasChildrenOnDemand())
{
pEntry->SetFlags(pEntry->GetFlags() | SvTLEntryFlags::SEMITRANSPARENT);
pEntry->SetTextColor(COL_GRAY);