summaryrefslogtreecommitdiff
path: root/src/core/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/channels.c')
-rw-r--r--src/core/channels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/channels.c b/src/core/channels.c
index 06bf0c41..1884c402 100644
--- a/src/core/channels.c
+++ b/src/core/channels.c
@@ -64,7 +64,7 @@ void channel_destroy(CHANNEL_REC *channel)
channel->destroying = TRUE;
channels = g_slist_remove(channels, channel);
- if (channel->server != NULL)
+ if (!channel->server->disconnected)
channel->server->channels = g_slist_remove(channel->server->channels, channel);
signal_emit("channel destroyed", 1, channel);