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.
This commit is contained in:
Benjamin Otte 2017-11-13 03:51:53 +01:00
parent b968147e0a
commit e0d3602331

View File

@ -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;