diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index 5fe10481..0473e52c 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -232,11 +232,12 @@ static void print_netjoins(NETJOIN_SERVER_REC *server) message before it. */ static void sig_print_starting(void) { - GSList *tmp; + GSList *tmp, *next; - for (tmp = joinservers; tmp != NULL; tmp = tmp->next) { + for (tmp = joinservers; tmp != NULL; tmp = next) { NETJOIN_SERVER_REC *server = tmp->data; + next = tmp->next; if (server->netjoins != NULL) print_netjoins(server); }