summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc/irc-buffer.c')
-rw-r--r--src/plugins/irc/irc-buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-buffer.c b/src/plugins/irc/irc-buffer.c
index 641d19a5a..a2e7e7f68 100644
--- a/src/plugins/irc/irc-buffer.c
+++ b/src/plugins/irc/irc-buffer.c
@@ -176,7 +176,8 @@ irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
if (ptr_channel)
{
/* send PART for channel if its buffer is closed */
- if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
+ if ((ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
+ && (ptr_channel->nicks))
{
irc_command_part_channel (ptr_server, ptr_channel->name, NULL);
irc_channel_free (ptr_server, ptr_channel);