From aa9505c5aec5d05fab25116d2425cf27afb58c41 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 24 Aug 2000 22:03:48 +0000 Subject: Check for selection->selection being NULL in 2000-08-24 Christopher James Lahey * e-table-selection-model.c: Check for selection->selection being NULL in e_table_selection_model_selected_count. svn path=/trunk/; revision=5025 --- widgets/e-table/ChangeLog | 5 +++++ widgets/e-table/e-table-selection-model.c | 3 +++ widgets/table/e-table-selection-model.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 365dfe2a30..1b64dddaea 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,8 @@ +2000-08-24 Christopher James Lahey + + * e-table-selection-model.c: Check for selection->selection being + NULL in e_table_selection_model_selected_count. + 2000-08-24 Christopher James Lahey * e-table-item.c: Pay attention to the return value from the click diff --git a/widgets/e-table/e-table-selection-model.c b/widgets/e-table/e-table-selection-model.c index 9079ce8623..ffe8cfa947 100644 --- a/widgets/e-table/e-table-selection-model.c +++ b/widgets/e-table/e-table-selection-model.c @@ -483,6 +483,9 @@ e_table_selection_model_selected_count (ETableSelectionModel *selection) int i; int last; + if (!selection->selection) + return 0; + count = 0; last = BOX(selection->row_count - 1); diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c index 9079ce8623..ffe8cfa947 100644 --- a/widgets/table/e-table-selection-model.c +++ b/widgets/table/e-table-selection-model.c @@ -483,6 +483,9 @@ e_table_selection_model_selected_count (ETableSelectionModel *selection) int i; int last; + if (!selection->selection) + return 0; + count = 0; last = BOX(selection->row_count - 1); -- cgit v1.2.3