summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-14 09:13:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-24 21:59:54 +0200
commit2f41ffb8e4a76aedd96240a32d09d8217815cde5 (patch)
treea557678d2ba3513e66e64b175d91e6f30eb2f39c
parent9d933f2846030fb192a866307a19218d11be9461 (diff)
tdf#148197 gtk_tree_row_reference_new_proxy warning on docking navigator
Gtk-CRITICAL **: 09:05:11.124: gtk_tree_row_reference_new_proxy: assertion 'path->depth > 0' failed from TreeView::set_cursor(-1) gtk_tree_view_set_cursor is ok (and documented as such) with an "invalid" path to unset the cursor, but there isn't the same for gtk_tree_view_scroll_to_cell, though there null is docs as acceptable. Change-Id: I11b94ba997fbbd2f31031d9e73765ea1882ad9ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132872 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit ffa172fc6b98d7d7dd3928693035a34cd331fe12) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133139 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 2732ea7dd0ad..9c6327d7c4f7 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14552,7 +14552,7 @@ public:
virtual void set_cursor(int pos) override
{
disable_notify_events();
- GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1);
+ GtkTreePath* path = pos != -1 ? gtk_tree_path_new_from_indices(pos, -1) : nullptr;
gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
gtk_tree_path_free(path);