diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-17 15:47:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-17 22:15:08 +0200 |
commit | c438f489093b082d28082e60042102ebf2c0d480 (patch) | |
tree | 9fc3d84d6492fe03bc82e814af764ca723d6d2d6 /vcl/unx | |
parent | f170faf8d07edb548f70092c0a694ec48a8982e4 (diff) |
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@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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 |