aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc_channel.c2
-rw-r--r--irc_im.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c
index 15b1744a..03fe93e9 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -142,6 +142,8 @@ int irc_channel_free( irc_channel_t *ic )
iu->last_channel = irc->default_channel;
}
+ if( ic->pastebuf_timer ) b_event_remove( ic->pastebuf_timer );
+
g_free( ic->name );
g_free( ic->topic );
g_free( ic->topic_who );
diff --git a/irc_im.c b/irc_im.c
index eb8d01f2..40264b49 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -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;
}