summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-11 15:27:08 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-02-13 16:21:11 +0100
commit9de96adeaba2beec3a55d6eb5ebb6e560b6126bf (patch)
tree7429814e02e2b20e0838e2335ca428ca22444fc2 /dbaccess
parent4abe4e9c92641896b4a0949e8a64a231d2f41c86 (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/+/110689 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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;
}