[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 23 07:33:14 UTC 2019
sw/source/uibase/utlui/content.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit dc29ba58ab50e3e32df348c4b23da176729d2504
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 22 12:13:21 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 23 09:32:22 2019 +0200
cid#1448428 Dereference before null check
Change-Id: Ied813af9926f405aef36dc3b8b450f32f9106d9c
Reviewed-on: https://gerrit.libreoffice.org/76132
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-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 ae42953cf7f3..11bef9fd89d9 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2476,7 +2476,7 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
for (auto const pCurrentEntry : selected)
{
assert(pCurrentEntry && lcl_IsContent(pCurrentEntry));
- if (pCurrentEntry && lcl_IsContent(pCurrentEntry))
+ if (lcl_IsContent(pCurrentEntry))
{
assert(dynamic_cast<SwContent*>(static_cast<SwTypeNumber*>(pCurrentEntry->GetUserData())));
if ((m_bIsRoot && m_nRootType == ContentTypeId::OUTLINE) ||
@@ -2511,7 +2511,7 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
// Set cursor back to the current position
pShell->GotoOutline( nActPos + nDir);
}
- else if (bOutlineWithChildren && pCurrentEntry)
+ else if (bOutlineWithChildren)
{
SwOutlineNodes::size_type nActEndPos = nActPos;
SvTreeListEntry* pEntry = pCurrentEntry;
@@ -2529,7 +2529,7 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
}
if (nDir == 1) // move down
{
- if (pCurrentEntry && IsSelected(pCurrentEntry->NextSibling()))
+ if (IsSelected(pCurrentEntry->NextSibling()))
nDir = nDirLast;
else
{
@@ -2587,7 +2587,7 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
}
else // move up
{
- if (pCurrentEntry && IsSelected(pCurrentEntry->PrevSibling()))
+ if (IsSelected(pCurrentEntry->PrevSibling()))
nDir = nDirLast;
else
{
More information about the Libreoffice-commits
mailing list