im.pidgin.pidgin: 809c8120ab77e68276baba04b130d65aa1cae31a

nosnilmot at pidgin.im nosnilmot at pidgin.im
Tue Feb 26 09:36:11 EST 2008


-----------------------------------------------------------------
Revision: 809c8120ab77e68276baba04b130d65aa1cae31a
Ancestor: 38186c8ce748007fdb4d2eefedee6f3642a9af90
Author: nosnilmot at pidgin.im
Date: 2008-02-26T14:02:06
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/809c8120ab77e68276baba04b130d65aa1cae31a

Modified files:
        libpurple/account.c

ChangeLog: 

I'm going to pretend this solves all my problems, except I can't see how
these would ever be called with a NULL account and my logs show no sign
that they are either. However, I haven't crashed since I made this change.
References #4814

-------------- next part --------------
============================================================
--- libpurple/account.c	4d59135382cc3ef5ce38072eb7f30c26c1e349c2
+++ libpurple/account.c	cd3c535543ab0968a87eaee1c49440df1735fa94
@@ -2368,9 +2368,14 @@ set_current_error(PurpleAccount *account
 set_current_error(PurpleAccount *account,
                   PurpleConnectionErrorInfo *new_err)
 {
-	PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
-	PurpleConnectionErrorInfo *old_err = priv->current_error;
+	PurpleAccountPrivate *priv;
+	PurpleConnectionErrorInfo *old_err;
 
+	g_return_if_fail(account != NULL);
+
+	priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
+	old_err = priv->current_error;
+
 	if(new_err == old_err)
 		return;
 
@@ -2393,9 +2398,15 @@ connection_error_cb(PurpleConnection *gc
                     const gchar *description,
                     gpointer unused)
 {
-	PurpleAccount *account = purple_connection_get_account(gc);
-	PurpleConnectionErrorInfo *err = g_new0(PurpleConnectionErrorInfo, 1);
+	PurpleAccount *account;
+	PurpleConnectionErrorInfo *err;
 
+	account = purple_connection_get_account(gc);
+
+	g_return_if_fail(account != NULL);
+
+	err = g_new0(PurpleConnectionErrorInfo, 1);
+
 	err->type = type;
 	err->description = g_strdup(description);
 


More information about the Commits mailing list