[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 27 11:30:42 UTC 2020
dbaccess/source/ui/dlg/indexdialog.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit e25ab39f2864d77f449d023540b4c4e8dbdd88ac
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 27 09:19:35 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 27 12:30:05 2020 +0100
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 at redhat.com>
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();
More information about the Libreoffice-commits
mailing list