diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-28 20:36:42 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-28 20:36:42 +0000 |
commit | 6871f558b567251d9789d1216f05f1c048682479 (patch) | |
tree | 234c94b75008e35b0a9338d7a1ae9d1f344a5c0d /src/core/servers.c | |
parent | 700df914298269a404acd5545637c592c8e191fa (diff) | |
download | irssi-6871f558b567251d9789d1216f05f1c048682479.zip |
when destroying channel, it really should be removed also from
server->channels list.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2829 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/servers.c')
-rw-r--r-- | src/core/servers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/servers.c b/src/core/servers.c index 4828750b..4f5b0402 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -361,15 +361,16 @@ int server_start_connect(SERVER_REC *server) static int server_remove_channels(SERVER_REC *server) { - GSList *tmp; + GSList *tmp, *next; int found; g_return_val_if_fail(server != NULL, FALSE); found = FALSE; - for (tmp = server->channels; tmp != NULL; tmp = tmp->next) { + for (tmp = server->channels; tmp != NULL; tmp = next) { CHANNEL_REC *channel = tmp->data; + next = tmp->next; channel_destroy(channel); found = TRUE; } |