diff options
author | Wilmer van der Gaast <wilmer@google.com> | 2010-12-02 12:14:09 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@google.com> | 2010-12-02 12:14:09 +0000 |
commit | cc20520bd29c88d424f44ac5669c3026e9fd99fb (patch) | |
tree | a11bdacd994046ce25a4e654c3d88a22724530a8 /irc_im.c | |
parent | b11b781cc66fa7ffeaa96e7a21b9d5b528d2c4a4 (diff) |
Clean up pastebuf_timer when cleaning up channels, and properly clean up
channel-chatroom reference when leaving a chatroom. This fixes two very
similar crash bugs when leaving a chatroom within the paste_buffer_delay
period.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -793,7 +793,8 @@ static gboolean bee_irc_channel_chat_privmsg_cb( gpointer data, gint fd, b_input { irc_channel_t *ic = data; - bee_chat_msg( ic->irc->b, ic->data, ic->pastebuf->str, 0 ); + if( ic->data ) + bee_chat_msg( ic->irc->b, ic->data, ic->pastebuf->str, 0 ); g_string_free( ic->pastebuf, TRUE ); ic->pastebuf = 0; @@ -840,6 +841,8 @@ 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 ); + ic->data = NULL; + return TRUE; } |