From 6963230895c26d054cc3543b03787118e2334c32 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 1 May 2011 15:57:30 +0100 Subject: Improved channel cleanup. Should fix a crash bug when leaving temporary groupchat channels (i.e. channels invited to on gtalk). #780. --- irc_im.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'irc_im.c') diff --git a/irc_im.c b/irc_im.c index 15c5783d..337cd30b 100644 --- a/irc_im.c +++ b/irc_im.c @@ -599,6 +599,7 @@ static gboolean bee_irc_chat_free( bee_t *bee, struct groupchat *c ) irc_channel_printf( ic, "Cleaning up channel, bye!" ); ic->data = NULL; + c->ui_data = NULL; irc_channel_del_user( ic, ic->irc->user, IRC_CDU_KICK, "Chatroom closed by server" ); return TRUE; @@ -904,7 +905,9 @@ static gboolean bee_irc_channel_chat_part( irc_channel_t *ic, const char *msg ) if( c && c->ic->acc->prpl->chat_leave ) c->ic->acc->prpl->chat_leave( c ); + /* Remove references in both directions now. We don't need each other anymore. */ ic->data = NULL; + c->ui_data = NULL; return TRUE; } -- cgit v1.2.3