aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-05-01 15:57:30 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-05-01 15:57:30 +0100
commit6963230895c26d054cc3543b03787118e2334c32 (patch)
tree2612548102d85397a7a2e62faa9871c2596fa418 /irc_im.c
parentd1d1b88eac1f5b63c98f7b7e4cf39d81cfc9b4d6 (diff)
Improved channel cleanup. Should fix a crash bug when leaving temporary
groupchat channels (i.e. channels invited to on gtalk). #780.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c3
1 files changed, 3 insertions, 0 deletions
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;
}