summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-11 15:27:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-17 11:13:28 +0100
commitda2ae86e2164d377869b07f7f90b7178b1963c6b (patch)
tree897a673123e2b3c6d9c15a9cb6c33fb6ae9d6155 /dbaccess
parent9b48f981807995d932ee36bd1f5b7972c72f871d (diff)
ignore row-activated with no active cursor position
to reproduce: under gen launch base wizard, "open an existing database file", and use the "open" button, double click a .odb. base launches on the 2nd button down, on mouse *release* base has appeared and has a treeview under the mouse which gets button up and triggers "onSelected" with the unexpected no-row selected case https: //crashreport.libreoffice.org/stats/crash_details/a6282ff5-d0aa-4beb-9b44-6c5fd2ca0130 Change-Id: Ic4a5fa9fc8c9c6bb0e33c165559eda966b83e3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110690 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 8570db552fe1..eba80dbfb4ec 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -70,11 +70,12 @@ void OTasksWindow::updateHelpText()
IMPL_LINK(OTasksWindow, onSelected, weld::TreeView&, rTreeView, bool)
{
m_nCursorIndex = rTreeView.get_cursor_index();
- assert(m_nCursorIndex != -1 && "OTasksWindow::onSelected: invalid entry!");
- URL aCommand;
- aCommand.Complete = reinterpret_cast<TaskEntry*>(rTreeView.get_id(m_nCursorIndex).toUInt64())->sUNOCommand;
- getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
-
+ if (m_nCursorIndex != -1)
+ {
+ URL aCommand;
+ aCommand.Complete = reinterpret_cast<TaskEntry*>(rTreeView.get_id(m_nCursorIndex).toUInt64())->sUNOCommand;
+ getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
+ }
return true;
}