diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table-memory.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c index 97ea2204e7..33ac959283 100644 --- a/widgets/table/e-table-memory.c +++ b/widgets/table/e-table-memory.c @@ -135,8 +135,8 @@ e_table_memory_new (void) gpointer e_table_memory_get_data (ETableMemory *etmm, int row) { - g_return_val_if_fail(row < 0, NULL); - g_return_val_if_fail(row >= etmm->priv->num_rows, NULL); + g_return_val_if_fail(row >= 0, NULL); + g_return_val_if_fail(row < etmm->priv->num_rows, NULL); return etmm->priv->data[row]; } @@ -152,8 +152,8 @@ e_table_memory_get_data (ETableMemory *etmm, int row) void e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data) { - g_return_if_fail(row < 0); - g_return_if_fail(row > etmm->priv->num_rows); + g_return_if_fail(row >= 0); + g_return_if_fail(row < etmm->priv->num_rows); etmm->priv->data[row] = data; } @@ -174,8 +174,8 @@ e_table_memory_insert (ETableMemory *etmm, int row, gpointer data) { - g_return_if_fail(row < -1); - g_return_if_fail(row > etmm->priv->num_rows); + g_return_if_fail(row >= -1); + g_return_if_fail(row < etmm->priv->num_rows); if (!etmm->priv->frozen) e_table_model_pre_change(E_TABLE_MODEL(etmm)); @@ -206,8 +206,8 @@ e_table_memory_remove (ETableMemory *etmm, int row) { gpointer ret; - g_return_val_if_fail(row < 0, NULL); - g_return_val_if_fail(row >= etmm->priv->num_rows, NULL); + g_return_val_if_fail(row >= 0, NULL); + g_return_val_if_fail(row < etmm->priv->num_rows, NULL); if (!etmm->priv->frozen) e_table_model_pre_change(E_TABLE_MODEL(etmm)); |