diff --git a/clutter/clutter-model.c b/clutter/clutter-model.c index 2b1954270..5a982ea34 100644 --- a/clutter/clutter-model.c +++ b/clutter/clutter-model.c @@ -244,7 +244,12 @@ clutter_model_real_get_column_name (ClutterModel *model, static guint clutter_model_real_get_n_columns (ClutterModel *model) { - return model->priv->n_columns; + ClutterModelPrivate *priv = model->priv; + + if (priv->n_columns < 0) + return 0; + + return priv->n_columns; } static void