Related: tdf#148197 gtk_tree_view_scroll_to_cell needs either path or column

so a null path is invalid here

Change-Id: I1958e9695e3290e0c513bce89c9548908860754f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134187
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 9c6327d..e29a1bfb 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14552,8 +14552,14 @@ public:
    virtual void set_cursor(int pos) override
    {
        disable_notify_events();
        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);
        GtkTreePath* path;
        if (pos != -1)
        {
            path = gtk_tree_path_new_from_indices(pos, -1);
            gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
        }
        else
            path = gtk_tree_path_new();
        gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
        gtk_tree_path_free(path);
        enable_notify_events();