dbaccess/source/ui/app/AppDetailView.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit da2ae86e2164d377869b07f7f90b7178b1963c6b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Feb 11 15:27:08 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Feb 17 11:13:28 2021 +0100

    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 <fit...@ubuntu.com>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

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;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to