diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-09 22:07:34 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-09 22:07:34 +0000 |
commit | 3060525426c082ad6bb04043bd79ef83c72235bb (patch) | |
tree | 9d52fbd09390624f92bb7efa9d5a59b3537b435b | |
parent | 5a4515b75967c779c9d4c8f0da45137a6739be50 (diff) | |
download | weechat-3060525426c082ad6bb04043bd79ef83c72235bb.zip |
Fixed crash when purging DCC when a closed DCC chat has no more buffer
-rw-r--r-- | src/irc/irc-channel.c | 10 | ||||
-rw-r--r-- | weechat/src/irc/irc-channel.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/irc/irc-channel.c b/src/irc/irc-channel.c index 2b0fee6a6..0def12c92 100644 --- a/src/irc/irc-channel.c +++ b/src/irc/irc-channel.c @@ -98,12 +98,14 @@ channel_free (t_irc_server *server, t_irc_channel *channel) return; /* close DCC CHAT */ - if ((t_irc_dcc *)(channel->dcc_chat) && - (!DCC_ENDED(((t_irc_dcc *)(channel->dcc_chat))->status))) + if (channel->dcc_chat) { ((t_irc_dcc *)(channel->dcc_chat))->channel = NULL; - dcc_close ((t_irc_dcc *)(channel->dcc_chat), DCC_ABORTED); - dcc_redraw (1); + if (!DCC_ENDED(((t_irc_dcc *)(channel->dcc_chat))->status)) + { + dcc_close ((t_irc_dcc *)(channel->dcc_chat), DCC_ABORTED); + dcc_redraw (1); + } } /* remove channel from queue */ diff --git a/weechat/src/irc/irc-channel.c b/weechat/src/irc/irc-channel.c index 2b0fee6a6..0def12c92 100644 --- a/weechat/src/irc/irc-channel.c +++ b/weechat/src/irc/irc-channel.c @@ -98,12 +98,14 @@ channel_free (t_irc_server *server, t_irc_channel *channel) return; /* close DCC CHAT */ - if ((t_irc_dcc *)(channel->dcc_chat) && - (!DCC_ENDED(((t_irc_dcc *)(channel->dcc_chat))->status))) + if (channel->dcc_chat) { ((t_irc_dcc *)(channel->dcc_chat))->channel = NULL; - dcc_close ((t_irc_dcc *)(channel->dcc_chat), DCC_ABORTED); - dcc_redraw (1); + if (!DCC_ENDED(((t_irc_dcc *)(channel->dcc_chat))->status)) + { + dcc_close ((t_irc_dcc *)(channel->dcc_chat), DCC_ABORTED); + dcc_redraw (1); + } } /* remove channel from queue */ |