[evolution-data-server] Add a bit more type checking in ESourceList



commit 586147a0e9caa92462b8c5a3495409bb83a76e83
Author: Milan Crha <mcrha redhat com>
Date:   Tue Aug 9 13:25:08 2011 +0200

    Add a bit more type checking in ESourceList

 libedataserver/e-source-list.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libedataserver/e-source-list.c b/libedataserver/e-source-list.c
index 1f102ba..a6d1d92 100644
--- a/libedataserver/e-source-list.c
+++ b/libedataserver/e-source-list.c
@@ -191,6 +191,9 @@ sync_idle_callback (ESourceList *list)
 {
 	GError *error = NULL;
 
+	g_return_val_if_fail (list != NULL, FALSE);
+	g_return_val_if_fail (E_IS_SOURCE_LIST (list), FALSE);
+
 	g_object_ref (list);
 	if (!e_source_list_sync (list, &error)) {
 		g_warning ("Cannot update \"%s\": %s", list->priv->gconf_path, error ? error->message : "Unknown error");
@@ -207,6 +210,9 @@ static void
 group_changed_callback (ESourceGroup *group,
 			ESourceList *list)
 {
+	g_return_if_fail (list != NULL);
+	g_return_if_fail (E_IS_SOURCE_LIST (list));
+
 	g_object_ref (list);
 
 	if (!list->priv->ignore_group_changed)
@@ -224,6 +230,9 @@ conf_changed_callback (GConfClient *client,
 		       GConfEntry *entry,
 		       ESourceList *list)
 {
+	g_return_if_fail (list != NULL);
+	g_return_if_fail (E_IS_SOURCE_LIST (list));
+
 	g_object_ref (list);
 	load_from_gconf (list);
 	g_object_unref (list);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]