[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 30 20:26:54 UTC 2020
sw/source/uibase/utlui/content.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 27740793367369c043721697955666be3a1ccda9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 30 19:30:03 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 30 21:26:21 2020 +0100
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 at redhat.com>
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);
More information about the Libreoffice-commits
mailing list