Fri, 03 Jan 2014 01:36:51 +0100
Fix a glib warning, by not calling g_object_notify while the connection object is being destroyed. There may be a better fix possible, though
| libpurple/connection.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/connection.c Thu Jan 02 20:10:51 2014 +0530 +++ b/libpurple/connection.c Fri Jan 03 01:36:51 2014 +0100 @@ -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; @@ -257,7 +259,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 @@ -736,6 +739,8 @@ PurplePluginProtocolInfo *prpl_info = NULL; gboolean remove = FALSE; + priv->is_finalizing = TRUE; + account = purple_connection_get_account(gc); purple_debug_info("connection", "Disconnecting connection %p\n", gc);