From 20925d94eb5649df410820e67017a299ce5d867d Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 26 Aug 2000 09:15:32 +0000 Subject: Added some g_return_if_fails and g_return_val_if_fails. 2000-08-25 Christopher James Lahey * e-table-col.c, e-table-config.c, e-table-header.c, e-table-text-model.c: Added some g_return_if_fails and g_return_val_if_fails. svn path=/trunk/; revision=5056 --- widgets/text/e-table-text-model.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'widgets/text') diff --git a/widgets/text/e-table-text-model.c b/widgets/text/e-table-text-model.c index 5b6fa8b707..abda0bcc84 100644 --- a/widgets/text/e-table-text-model.c +++ b/widgets/text/e-table-text-model.c @@ -198,7 +198,12 @@ row_changed (ETableModel *table_model, int row, ETableTextModel *model) ETableTextModel * e_table_text_model_new (ETableModel *table_model, int row, int model_col) { - ETableTextModel *model = gtk_type_new (e_table_text_model_get_type ()); + ETableTextModel *model; + + g_return_val_if_fail(table_model != NULL, NULL); + g_return_val_if_fail(E_IS_TABLE_MODEL(table_model), NULL); + + model = gtk_type_new (e_table_text_model_get_type ()); model->model = table_model; if (model->model){ gtk_object_ref (GTK_OBJECT(model->model)); -- cgit