diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-27 09:13:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-27 10:59:58 +0100 |
commit | a5d8e924531ee6938df92fa9d1508ee2a3118554 (patch) | |
tree | 78fee92baf067a03901d4aaf46a5519027e925a6 | |
parent | e778b72fe616badf400960e0459ee661e535bd45 (diff) |
cid#1460973 Explicit null dereferenced
Change-Id: Ibdeae2e76cda7cf13cb5f3db998462c1ada7bb96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91192
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 77ca2543ccb5..3261050f3a6c 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -950,7 +950,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont) IMPL_LINK_NOARG( SwGlobalTree, DoubleClickHdl, weld::TreeView&, bool) { int nEntry = m_xTreeView->get_cursor_index(); - SwGlblDocContent* pCont = nEntry != -1 ? reinterpret_cast<SwGlblDocContent*>(m_xTreeView->get_id(nEntry).toInt64()) : nullptr; + SwGlblDocContent* pCont = reinterpret_cast<SwGlblDocContent*>(m_xTreeView->get_id(nEntry).toInt64()); if (pCont->GetType() == GLBLDOC_SECTION) OpenDoc(pCont); else |