summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-09 10:14:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-09 14:49:20 +0200
commita51f99f6ca7e95a4b9e92851ca2cda832584faff (patch)
treec6d9a0688907096c9eb035c5333d18a4f44f6540
parent1f6842a5afea1a41ef67b9ee78da9bf30c02ffff (diff)
cid#1465229 Unchecked return value
Change-Id: I7e12612f1aa2570df8f5b0347f19dcb96532aa26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/form/navigatortree.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 70d1e713ac40..8bc70bdb9510 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -711,7 +711,8 @@ namespace svxform
sal_Int8 nAction = m_aControlExchange.isClipboardOwner() && doingKeyboardCut( ) ? DND_ACTION_MOVE : DND_ACTION_COPY;
std::unique_ptr<weld::TreeIter> xSelected(m_xTreeView->make_iterator());
- m_xTreeView->get_selected(xSelected.get());
+ if (!m_xTreeView->get_selected(xSelected.get()))
+ xSelected.reset();
return nAction == implAcceptDataTransfer(aClipboardContent.GetDataFlavorExVector(), nAction, xSelected.get(), false);
}