aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-table-text-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/text/e-table-text-model.c')
-rw-r--r--widgets/text/e-table-text-model.c7
1 files changed, 6 insertions, 1 deletions
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));