diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-join.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/unit/plugins/irc/test-irc-join.cpp b/tests/unit/plugins/irc/test-irc-join.cpp index ed8aa4087..012f6ed42 100644 --- a/tests/unit/plugins/irc/test-irc-join.cpp +++ b/tests/unit/plugins/irc/test-irc-join.cpp @@ -168,7 +168,7 @@ TEST(IrcJoin, SplitBuildString) struct t_arraylist *arraylist; struct t_irc_join_channel **channels; struct t_irc_server *server; - struct t_irc_channel *ptr_channel; + struct t_irc_channel *ptr_channel, *ptr_next_channel; char *autojoin; arraylist = irc_join_split (NULL, NULL, IRC_JOIN_SORT_DISABLED); @@ -388,11 +388,13 @@ TEST(IrcJoin, SplitBuildString) STRCMP_EQUAL("#xyz,#CHAN{A}~,#def,#abc,#zzz key_xyz", autojoin); free (autojoin); arraylist_free (arraylist); - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) + ptr_channel = server->channels; + while (ptr_channel) { + ptr_next_channel = ptr_channel->next_channel; if (ptr_channel->buffer) gui_buffer_close (ptr_channel->buffer); + ptr_channel = ptr_next_channel; } irc_server_free (server); } |