diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-09-20 06:10:43 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-09-20 06:10:43 +0800 |
commit | cde9b85e6b18809cafa42b6da12f8bd4b1657b3d (patch) | |
tree | bd3ef11bad785e0a71aeba5cc4f8b91e07ff05eb | |
parent | f9329be8eee2a0d467e74eeb951506923699feae (diff) | |
download | gsoc2013-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
-rw-r--r-- | widgets/table/e-table-selection-model.c | 6 |
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; } |