soc.2009.telepathy: 128beb45: Fixed crash on incoming conversations

sttwister at soc.pidgin.im sttwister at soc.pidgin.im
Tue Jun 2 15:20:29 EDT 2009


-----------------------------------------------------------------
Revision: 128beb45ae6b7e842ceb9ba7eb1b2551bb96588c
Ancestor: 56ce04a82ed32fd25c4a93041494e527debb5d1d
Author: sttwister at soc.pidgin.im
Date: 2009-06-02T18:20:25
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/128beb45ae6b7e842ceb9ba7eb1b2551bb96588c

Modified files:
        libpurple/protocols/telepathy/telepathy.c

ChangeLog: 

Fixed crash on incoming conversations

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy.c	82021ad730e5ba0e4c5e21109a1d7b3afc8fa9d2
+++ libpurple/protocols/telepathy/telepathy.c	827d2742a1d7d57c9b959b99488c662e1df97498
@@ -354,6 +354,14 @@ handle_text_channel (TpChannel *channel,
 	purple_debug_info("telepathy", "Saving TpChannel proxy for %s\n", who);
 
 	tp_channel = g_hash_table_lookup(data->text_Channels, who);
+
+	/* if tp_channel exists, then we requested this channel, else it's an incoming request so we must cache it */
+	if (tp_channel == NULL)
+	{
+		tp_channel = g_new0(telepathy_text_channel, 1);
+		g_hash_table_insert(data->text_Channels, who, tp_channel);
+	}
+
 	tp_channel->channel = channel;
 
 	tp_cli_channel_type_text_connect_to_received(channel, received_cb, plugin, NULL, NULL, &error);


More information about the Commits mailing list