summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-27 09:19:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-27 12:30:05 +0100
commite25ab39f2864d77f449d023540b4c4e8dbdd88ac (patch)
tree15ca189049868b634bcfc72995bd9c03f4a98833 /dbaccess
parent5bcd3335012c25edb03c858b3fb44ec26b0a25d4 (diff)
cid#1460975 Unchecked return value
Change-Id: I37fbce514318609d3b6c99a11070e43e2a03ee03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91194 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index fb698aabd6e2..a70ffd59a540 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -381,8 +381,11 @@ namespace dbaui
// the selected index
std::unique_ptr<weld::TreeIter> xSelected(m_xIndexList->make_iterator());
// the selected index
- m_xIndexList->get_selected(xSelected.get());
+ if (!m_xIndexList->get_selected(xSelected.get()))
+ xSelected.reset();
OSL_ENSURE(xSelected, "DbaIndexDialog::OnResetIndex: invalid call!");
+ if (!xSelected)
+ return;
Indexes::iterator aResetPos = m_xIndexes->begin() + m_xIndexList->get_id(*xSelected).toUInt32();