From: John Darrington Date: Thu, 27 Nov 2008 00:47:34 +0000 (+0900) Subject: Added g_return_if_fail to new methods X-Git-Tag: v0.7.1~107^2~6 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=292fd9099f8ffd4b4afcd668629f8fd0c7a26860;p=pspp-builds.git Added g_return_if_fail to new methods --- 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;