Mercurial > pidgin.yaz
diff libpurple/account.c @ 28715:c4fa41bb1672
Fixing leak is nice, but let's not crash in the process.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 08 Oct 2009 19:15:31 +0000 |
parents | 372f6b7b7f04 |
children | e0223ad82ca1 a4e4d27fb810 |
line wrap: on
line diff
--- a/libpurple/account.c Thu Oct 08 18:16:41 2009 +0000 +++ b/libpurple/account.c Thu Oct 08 19:15:31 2009 +0000 @@ -1052,8 +1052,10 @@ priv = PURPLE_ACCOUNT_GET_PRIVATE(account); PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error); - g_free(priv->current_error->description); - g_free(priv->current_error); + if (priv->current_error) { + g_free(priv->current_error->description); + g_free(priv->current_error); + } g_free(priv); PURPLE_DBUS_UNREGISTER_POINTER(account);