AmendHub

Download:

jcs

/

wallops

/

amendments

/

89

chatter: Pull conn out of tab during destruction


jcs made amendment 89 2 months ago
--- chatter.c Wed Sep 11 16:33:31 2024 +++ chatter.c Wed Sep 11 21:31:51 2024 @@ -1294,15 +1294,17 @@ void chatter_close_tab(struct chatter *chatter, struct chatter_tab *tab) { struct chatter_tab *ttab = NULL, *next_tab = NULL; + struct irc_connection *conn = NULL; struct irc_channel *channel = NULL; short n; if (!tab) return; + conn = tab->conn; if (tab->channel) channel = tab->channel; - + SLIST_FOREACH(ttab, &chatter->tabs_list, list) { if (ttab->conn != tab->conn) continue; @@ -1326,7 +1328,7 @@ chatter_close_tab(struct chatter *chatter, struct chat xfree(&tab); if (channel) - irc_part_channel(tab->conn, channel); + irc_part_channel(conn, channel); if (next_tab == NULL) chatter_draw_tab_bar(chatter);