aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/irc_im.c b/irc_im.c
index 46699747..2d569bbb 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -862,8 +862,11 @@ static gboolean bee_irc_channel_chat_part(irc_channel_t *ic, const char *msg)
c->ic->acc->prpl->chat_leave(c);
}
- /* Remove the reference. We don't need it anymore. */
- ic->data = NULL;
+ if (!(ic->flags & IRC_CHANNEL_TEMP)) {
+ /* Remove the reference.
+ * We only need it for temp channels that are being freed */
+ ic->data = NULL;
+ }
return TRUE;
}