[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 17 20:15:47 UTC 2020


 vcl/unx/gtk3/gtk3gtkinst.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit c438f489093b082d28082e60042102ebf2c0d480
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 17 15:47:40 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jun 17 22:15:08 2020 +0200

    avoid gtk_tree_view_get_dest_row_at_pos: assertion 'drag_x >= 0'
    
    Change-Id: I24328c14a666dc580d189ad9475c967ba43cf399
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96551
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f394a04fba84..e1c7aa4e7260 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -11233,6 +11233,12 @@ public:
 
     virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter* pResult, bool bHighLightTarget) override
     {
+        if (rPos.X() < 0 || rPos.Y() < 0)
+        {
+            // short-circuit to avoid "gtk_tree_view_get_dest_row_at_pos: assertion 'drag_x >= 0'" g_assert
+            return false;
+        }
+
         const bool bAsTree = gtk_tree_view_get_enable_tree_lines(m_pTreeView);
 
         // to keep it simple we'll default to always drop before the current row


More information about the Libreoffice-commits mailing list