[gtk+/a11y] GailTreeView: deal with absence of model
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] GailTreeView: deal with absence of model
- Date: Tue, 21 Jun 2011 22:54:36 +0000 (UTC)
commit 71c2258821b82db77cd2ac0622abeb4f55c03eb7
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 21 18:53:06 2011 -0400
GailTreeView: deal with absence of model
gtk/a11y/gailtreeview.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/a11y/gailtreeview.c b/gtk/a11y/gailtreeview.c
index 77ef9c9..338e646 100644
--- a/gtk/a11y/gailtreeview.c
+++ b/gtk/a11y/gailtreeview.c
@@ -1271,7 +1271,9 @@ gail_tree_view_get_n_rows (AtkTable *table)
tree_view = GTK_TREE_VIEW (widget);
tree_model = gtk_tree_view_get_model (tree_view);
- if (gtk_tree_model_get_flags (tree_model) & GTK_TREE_MODEL_LIST_ONLY)
+ if (!tree_model)
+ n_rows = 0;
+ else if (gtk_tree_model_get_flags (tree_model) & GTK_TREE_MODEL_LIST_ONLY)
/*
* If working with a LIST store, then this is a faster way
* to get the number of rows.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]