From 4508cf787c673ae9ce69c55f161c876e9c851cfd Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 20 Feb 2003 21:52:15 +0000 Subject: fix overzealous g_asserts to avoid crashes when eti->rows is already 2003-02-20 Mike Kestner * e-table-item.c (eti_table_model_rows_deleted): fix overzealous g_asserts to avoid crashes when eti->rows is already updated. svn path=/trunk/; revision=19982 --- widgets/table/e-table-item.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'widgets') diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index ac73bc1f9a..8b64d06d2d 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1169,13 +1169,9 @@ eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETab return; } - g_assert (eti->rows == -1 || row + count <= eti->rows); - eti->rows = e_table_model_row_count (eti->table_model); - g_assert (row <= eti->rows); - - if (eti->height_cache) { + if (eti->height_cache && (eti->rows > row)) { memmove(eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof(int)); } -- cgit