summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-06-27 11:18:17 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-07-04 17:21:18 +0200
commitac0a38eb86993bb2b223f08d3402ff9e1d4be27a (patch)
tree22a080cec7d6180b21206792ce8c445faa881089
parentae6497b99573a0bed78660f739a1a7937e2b2c10 (diff)
downloadtelepathy-glib-ac0a38eb86993bb2b223f08d3402ff9e1d4be27a.tar.gz
TpBaseClient: Ensure that the Connection knows its Account early
This fixes a crash in empathy-chat: https://bugs.freedesktop.org/show_bug.cgi?id=51444
-rw-r--r--telepathy-glib/base-client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 938d94afb..dfdda154a 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -199,6 +199,7 @@
#include <telepathy-glib/util.h>
#define DEBUG_FLAG TP_DEBUG_CLIENT
+#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/deprecated-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
@@ -1689,6 +1690,11 @@ ensure_account_connection_channels (TpBaseClient *self,
if (*connection == NULL)
goto error;
+ /* fdo#51444: Custom TpChannel subclasses constructors may assume that the
+ * Connection already knows its Account. If we don't do it here, it will be
+ * done only when TP_ACCOUNT_FEATURE_CORE gets prepared on the Account. */
+ _tp_connection_set_account (*connection, *account);
+
if (channels_arr->len == 0)
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,