diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 12:25:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 16:21:01 +0100 |
commit | c118de71bf9be88ab1045621116e04bf0d1e084f (patch) | |
tree | d3054c188978b94298c102cccf51e442c591fbe3 /svx/source | |
parent | b55eca694b3cf4bcaec59512709c705fe4c25943 (diff) |
cid#1500564 Dereference null return value
Change-Id: Ia3e0521a013c3226f2fd5fdfef4e67dc1d5a0374
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130276
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/form/filtnav.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 66c70522cf16..5f73b825f331 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1239,8 +1239,11 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) FmFilterItems* pTargetItems = getTargetItems(*m_xTreeView, *xDropTarget); m_xTreeView->unselect_all(); std::unique_ptr<weld::TreeIter> xEntry = FindEntry(pTargetItems); - m_xTreeView->select(*xEntry); - m_xTreeView->set_cursor(*xEntry); + if (xEntry) + { + m_xTreeView->select(*xEntry); + m_xTreeView->set_cursor(*xEntry); + } insertFilterItem(m_aControlExchange->getDraggedEntries(),pTargetItems,DND_ACTION_COPY == rEvt.mnAction); |