# HG changeset patch # User Stu Tomlinson # Date 1204034526 0 # Node ID 5fd8b4b4c6bd8ec20044a2ebf61977f52c529306 # Parent dc47e908965fccad690bb1ca6dd2810970f30699 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 diff -r dc47e908965f -r 5fd8b4b4c6bd libpurple/account.c --- a/libpurple/account.c Tue Feb 26 13:53:22 2008 +0000 +++ b/libpurple/account.c Tue Feb 26 14:02:06 2008 +0000 @@ -2368,8 +2368,13 @@ 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,8 +2398,14 @@ 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);