aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-09-20 06:10:43 +0800
committerChris Lahey <clahey@src.gnome.org>2001-09-20 06:10:43 +0800
commitcde9b85e6b18809cafa42b6da12f8bd4b1657b3d (patch)
treebd3ef11bad785e0a71aeba5cc4f8b91e07ff05eb /widgets/table
parentf9329be8eee2a0d467e74eeb951506923699feae (diff)
downloadgsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar.gz
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar.bz2
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar.lz
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar.xz
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.tar.zst
gsoc2013-evolution-cde9b85e6b18809cafa42b6da12f8bd4b1657b3d.zip
Confirm row count here. (etsm_get_row_count): Make sure etsm->model isn't
2001-09-19 Christopher James Lahey <clahey@ximian.com> * e-table-selection-model.c (add_model): Confirm row count here. (etsm_get_row_count): Make sure etsm->model isn't NULL here. If it is, it's not an error. Return 0 in this case. svn path=/trunk/; revision=12993
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-selection-model.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index dfeaac532c..56fa07213a 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -174,6 +174,7 @@ add_model(ETableSelectionModel *etsm, ETableModel *model)
etsm->model_rows_deleted_id = gtk_signal_connect(GTK_OBJECT(model), "model_rows_deleted",
GTK_SIGNAL_FUNC(model_rows_deleted), etsm);
}
+ e_selection_model_array_confirm_row_count(E_SELECTION_MODEL_ARRAY(etsm));
}
inline static void
@@ -292,5 +293,8 @@ etsm_get_row_count (ESelectionModelArray *esma)
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL(esma);
- return e_table_model_row_count (etsm->model);
+ if (etsm->model)
+ return e_table_model_row_count (etsm->model);
+ else
+ return 0;
}