gobjectification: f4bf48c7: make sure gc is a purple connection inst...

ecoffey at soc.pidgin.im ecoffey at soc.pidgin.im
Fri Jun 20 21:30:40 EDT 2008


-----------------------------------------------------------------
Revision: f4bf48c7c2f45c8dd96a973162e174e90f3f53c0
Ancestor: bf491235084f4b4af8d1b42701539dbcdd9787fe
Author: ecoffey at soc.pidgin.im
Date: 2008-06-21T01:26:42
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/f4bf48c7c2f45c8dd96a973162e174e90f3f53c0

Modified files:
        libpurple/connection.c

ChangeLog: 

make sure gc is a purple connection instead of just not null

-------------- next part --------------
============================================================
--- libpurple/connection.c	f43d120e5fe51572193c734b86b2066fb6459c1d
+++ libpurple/connection.c	2dbc99dfc8b491c4eae0573da28d059590f79edd
@@ -298,7 +298,7 @@ purple_connection_destroy(PurpleConnecti
 	PurplePluginProtocolInfo *prpl_info = NULL;
 	gboolean remove = FALSE;
 
-	g_return_if_fail(gc != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 
 	account = purple_connection_get_account(gc);
 
@@ -380,7 +380,7 @@ purple_connection_set_state(PurpleConnec
 {
 	PurpleConnectionUiOps *ops;
 
-	g_return_if_fail(gc != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 
 	if (gc->priv->state == state)
 		return;
@@ -466,14 +466,14 @@ void purple_connection_set_flags(PurpleC
 
 void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags)
 {
-	g_return_if_fail(gc);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 	gc->priv->flags = flags;
 }
 
 void
 purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account)
 {
-	g_return_if_fail(gc != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 	g_return_if_fail(account != NULL);
 
 	if (gc->priv->account == account)
@@ -495,7 +495,7 @@ purple_connection_set_display_name(Purpl
 void
 purple_connection_set_display_name(PurpleConnection *gc, const char *name)
 {
-	g_return_if_fail(gc != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 
 	g_free(gc->priv->display_name);
 	gc->priv->display_name = g_strdup(name);
@@ -555,7 +555,7 @@ purple_connection_update_progress(Purple
 {
 	PurpleConnectionUiOps *ops;
 
-	g_return_if_fail(gc   != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 	g_return_if_fail(text != NULL);
 	g_return_if_fail(step < count);
 	g_return_if_fail(count > 1);
@@ -579,7 +579,7 @@ purple_connection_notice(PurpleConnectio
 {
 	PurpleConnectionUiOps *ops;
 
-	g_return_if_fail(gc   != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 	g_return_if_fail(text != NULL);
 
 #if 0
@@ -623,7 +623,7 @@ purple_connection_error_reason (PurpleCo
 {
 	PurpleConnectionUiOps *ops;
 
-	g_return_if_fail(gc   != NULL);
+	g_return_if_fail(PURPLE_IS_CONNECTION(gc));
 	/* This sanity check relies on PURPLE_CONNECTION_ERROR_OTHER_ERROR
 	 * being the last member of the PurpleConnectionError enum in
 	 * connection.h; if other reasons are added after it, this check should


More information about the Commits mailing list