summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/section.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-14 13:58:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-14 14:14:36 +0200
commit0869895063bd528893707cb74c6cf4c461fef066 (patch)
treebf47ccc71145f3ee387a5dafbaab9bc86b47a008 /sw/source/core/docnode/section.cxx
parent4acae16f9252ada89fd530f1ca86edafc046bc07 (diff)
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/core/docnode/section.cxx')
-rw-r--r--sw/source/core/docnode/section.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index d2474855d4ad..3d8704142ff1 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1108,7 +1108,9 @@ static void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
{
// break the link of the corresponding section.
// the link is also removed from the link manager
- pSectLnk->GetSectNode()->GetSection().BreakLink();
+ SwSectionNode* pSectNode = pSectLnk->GetSectNode();
+ assert(pSectNode);
+ pSectNode->GetSection().BreakLink();
// for robustness, because link is removed from the link manager
if ( n > rLnks.size() )