diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 15:27:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 17:05:31 +0000 |
commit | 2fc13fef1478925f5ea447b3b293c2e36c0c6696 (patch) | |
tree | f9d84986197292020a55f95ba28186479aa2cdc0 | |
parent | 359e68815db3354fff974993e2bf2449d9d722fc (diff) |
coverity#1399020 Dereference after null check
Change-Id: Ic4a2eb0425cd48de85a40350c7368ade486842c2
-rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 057d0a99ca14..70a0f726389f 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -303,12 +303,12 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T } SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell(); - SwWrtShell *const pWrtShell = (pDocShell) ? pDocShell->GetWrtShell() : nullptr; - SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : nullptr; + SwWrtShell *const pWrtShell = pDocShell ? pDocShell->GetWrtShell() : nullptr; + SwPostItMgr *const pPostItMgr = pWrtShell ? pWrtShell->GetPostItMgr() : nullptr; // If there is an active text edit, then search there. bool bEndedTextEdit = false; - SdrView* pSdrView = pWrtShell->GetDrawView(); + SdrView* pSdrView = pWrtShell ? pWrtShell->GetDrawView() : nullptr; if (pSdrView) { // If the edited object is not anchored to this node, then ignore it. |