From 292fd9099f8ffd4b4afcd668629f8fd0c7a26860 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 27 Nov 2008 09:47:34 +0900 Subject: [PATCH] Added g_return_if_fail to new methods --- lib/gtksheet/gsheetmodel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gtksheet/gsheetmodel.c b/lib/gtksheet/gsheetmodel.c index 0839f221..2497097d 100644 --- a/lib/gtksheet/gsheetmodel.c +++ b/lib/gtksheet/gsheetmodel.c @@ -505,7 +505,6 @@ g_sheet_model_get_row_count(const GSheetModel *model) { g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1); - return G_SHEET_MODEL_GET_IFACE (model)->get_row_count (model); } @@ -515,6 +514,8 @@ g_sheet_model_get_row_count(const GSheetModel *model) gboolean g_sheet_model_get_column_sensitivity (const GSheetModel *model, gint col) { + g_return_val_if_fail (G_IS_SHEET_MODEL (model), FALSE); + if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_column_sensitivity) return TRUE; @@ -553,6 +554,8 @@ GtkJustification g_sheet_model_get_column_justification (const GSheetModel *model, gint col) { + g_return_val_if_fail (G_IS_SHEET_MODEL (model), GTK_JUSTIFY_LEFT); + if ( G_SHEET_MODEL_GET_IFACE (model)->get_column_justification) return G_SHEET_MODEL_GET_IFACE (model)->get_column_justification (model, col); @@ -564,6 +567,8 @@ g_sheet_model_get_column_justification (const GSheetModel *model, gboolean g_sheet_model_get_row_sensitivity (const GSheetModel *model, gint row) { + g_return_val_if_fail (G_IS_SHEET_MODEL (model), FALSE); + if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_row_sensitivity) return TRUE; -- 2.30.2