[gtk+] a11y: Handle a treeview with no columns
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Handle a treeview with no columns
- Date: Mon, 13 Nov 2017 02:54:47 +0000 (UTC)
commit e0d360233141e4d4fb22d5d332e5372560daff20
Author: Benjamin Otte <otte redhat com>
Date: Mon Nov 13 03:51:53 2017 +0100
a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
gtk/a11y/gtktreeviewaccessible.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 44d68fe..3a184e7 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -1890,7 +1890,7 @@ static GtkTreeViewColumn *
get_effective_focus_column (GtkTreeView *treeview,
GtkTreeViewColumn *column)
{
- if (column == NULL)
+ if (column == NULL && get_n_columns (treeview) > 0)
column = get_visible_column (treeview, 0);
return column;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]