diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 15:41:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 16:18:58 +0000 |
commit | c3c41f2190739243a8e9d9c8c44759f30e7a1bbf (patch) | |
tree | 8e811bdcd17f8de439dad872b990ba96ed17ee6d | |
parent | 6ee80e749a9ce6f56d53205ac1bd5d19429138a7 (diff) |
coverity#735901 Dereference after null check
Change-Id: Ie7defb4233a8ed51d358f8686ea8bfb6d22bb4c3
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index a97dfe0068c2..bec2c28f4e12 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1614,7 +1614,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) pDestNd = rPos.nNode.GetNode().GetTxtNode(); } - if( pDestNd && pEnd->nContent.GetIndex() ) + if (pDestNd && pEnd->nContent.GetIndex()) { // move the content into the new node SwIndex aIdx( pEndSrcNd, 0 ); @@ -1622,7 +1622,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) pEnd->nContent.GetIndex()); } - if( bCopyCollFmt ) + if (pDestNd && bCopyCollFmt) { SwDoc* const pInsDoc = pDestNd->GetDoc(); ::sw::UndoGuard const ug(pInsDoc->GetIDocumentUndoRedo()); |