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-12 10:09:50 +0100
commitc08ec94ae04656e5178a704445080fe6887aac5a (patch)
treee97f4e5d5f69ccd3e00a4d6212ea6d925de69615 /dbaccess
parent7ff14c0f79d8400ec2fe29350b0d9bc0cd51f957 (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/+/110768 Tested-by: Jenkins Reviewed-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;
}