changeset 6774:c4e3cc0693ab

[gaim-migrate @ 7312] idiot checks committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 07 Sep 2003 05:10:52 +0000
parents addc5c8c0df1
children 272b67f33a1e
files src/blist.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Sun Sep 07 04:54:13 2003 +0000
+++ b/src/blist.c	Sun Sep 07 05:10:52 2003 +0000
@@ -460,6 +460,10 @@
 	struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
 	gboolean save = FALSE;
 
+
+	g_return_if_fail(chat != NULL);
+	g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT((GaimBlistNode*)chat));
+
 	if (!n) {
 		if (!g) {
 			g = gaim_group_new(_("Chats"));
@@ -537,6 +541,7 @@
 	struct _gaim_hbuddy *hb;
 
 	g_return_if_fail(buddy != NULL);
+	g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY((GaimBlistNode*)buddy));
 
 	bnode = (GaimBlistNode *)buddy;
 
@@ -711,8 +716,8 @@
 	GaimBlistNode *gnode, *cnode, *bnode;
 	gboolean save = FALSE;
 
-	if(!contact)
-		return;
+	g_return_if_fail(contact != NULL);
+	g_return_if_fail(GAIM_BLIST_NODE_IS_CONTACT((GaimBlistNode*)contact));
 
 	if(node && (GAIM_BLIST_NODE_IS_CONTACT(node) ||
 				GAIM_BLIST_NODE_IS_CHAT(node)))
@@ -802,6 +807,9 @@
 	GaimBlistNode *gnode = (GaimBlistNode*)group;
 	gboolean save = FALSE;
 
+	g_return_if_fail(group != NULL);
+	g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP((GaimBlistNode*)group));
+
 	if (!gaimbuddylist)
 		gaimbuddylist = gaim_blist_new();
 	ops = gaimbuddylist->ui_ops;