diff -r 602023a35d92 -r dfe5c47d56a9 libpurple/connection.c --- a/libpurple/connection.c Thu Jan 02 21:37:02 2014 +0530 +++ b/libpurple/connection.c Sat Jan 04 23:00:37 2014 +0530 @@ -81,6 +81,8 @@ */ gboolean wants_to_die; + gboolean is_finalizing; /**< The object is being destroyed. */ + /** The connection error and its description if an error occured */ PurpleConnectionErrorInfo *error_info; @@ -252,7 +254,8 @@ ops->disconnected(gc); } - g_object_notify_by_pspec(G_OBJECT(gc), properties[PROP_STATE]); + if (!priv->is_finalizing) + g_object_notify_by_pspec(G_OBJECT(gc), properties[PROP_STATE]); } void @@ -730,6 +733,8 @@ GSList *buddies; gboolean remove = FALSE; + priv->is_finalizing = TRUE; + account = purple_connection_get_account(gc); purple_debug_info("connection", "Disconnecting connection %p\n", gc);