diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-20 10:26:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-20 13:15:46 +0200 |
commit | e79d4129dc2ecbd7f1ce75eb36f743621a0480a6 (patch) | |
tree | 64134a5a0945806ad86fe033f87be1d1d6ce41be /sw/source/uibase/utlui | |
parent | 1f4674c7c123a667f4febbbb96b1a1d0e083f19c (diff) |
coverity#705523 silence Dereference null return value
Change-Id: Ic7719a543b341ca78264a24568b63cc69069c8e5
Reviewed-on: https://gerrit.libreoffice.org/43592
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 65138aac5fd3..c07efed0fd54 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2069,6 +2069,7 @@ bool SwContentTree::HasContentChanged() for(size_t j = 0; j < nChildCount; ++j) { pEntry = Next(pEntry); + assert(pEntry); const SwContent* pCnt = pArrType->GetMember(j); pEntry->SetUserData(const_cast<SwContent *>(pCnt)); OUString sEntryText = GetEntryText(pEntry); @@ -2139,6 +2140,7 @@ bool SwContentTree::HasContentChanged() for(size_t j = 0; j < nChildCount; ++j) { pEntry = Next(pEntry); + assert(pEntry); bNext = false; const SwContent* pCnt = pArrType->GetMember(j); pEntry->SetUserData(const_cast<SwContent *>(pCnt)); @@ -2172,6 +2174,7 @@ bool SwContentTree::HasContentChanged() for(size_t j = 0; j < nChildCount; ++j) { const SwContent* pCnt = pArrType->GetMember(j); + assert(pChild); pChild->SetUserData(const_cast<SwContent *>(pCnt)); OUString sEntryText = GetEntryText(pChild); if( sEntryText != pCnt->GetName() && @@ -2187,6 +2190,7 @@ bool SwContentTree::HasContentChanged() for(size_t j = 0; j < nChildCount; ++j) { pChild = Next(pRemove); + assert(pRemove); GetModel()->Remove(pRemove); pRemove = pChild; } |