summaryrefslogtreecommitdiff
path: root/src/irc/irc-dcc.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-06-10 16:42:22 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-06-10 16:42:22 +0000
commitcb329a3f33c2a5f64baa59ff26cef4deea26cf2d (patch)
tree2e6d5b2e80d4a074eb94f3ea221b135e2bb959e2 /src/irc/irc-dcc.c
parent59795445c5de195bf0c8ca5e9002253a28d22128 (diff)
downloadweechat-cb329a3f33c2a5f64baa59ff26cef4deea26cf2d.zip
Fixed crashes with DCC chat remove/purge on DCC view (bug #16775)
Diffstat (limited to 'src/irc/irc-dcc.c')
-rw-r--r--src/irc/irc-dcc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/irc/irc-dcc.c b/src/irc/irc-dcc.c
index f68274762..d8337644d 100644
--- a/src/irc/irc-dcc.c
+++ b/src/irc/irc-dcc.c
@@ -345,6 +345,9 @@ dcc_free (t_irc_dcc *ptr_dcc)
{
t_irc_dcc *new_dcc_list;
+ if (!ptr_dcc)
+ return;
+
/* DCC CHAT with channel => remove channel
(to prevent channel from becoming standard pv) */
if (ptr_dcc->channel)
@@ -354,7 +357,8 @@ dcc_free (t_irc_dcc *ptr_dcc)
|| (DCC_ENDED(((t_irc_dcc *)(ptr_dcc->channel->dcc_chat))->status)))
{
gui_buffer_free (ptr_dcc->channel->buffer, 1);
- channel_free (ptr_dcc->server, ptr_dcc->channel);
+ if (ptr_dcc->channel)
+ channel_free (ptr_dcc->server, ptr_dcc->channel);
}
}